Train and evaluate model on the two datasets

Assignment Help Python Programming
Reference no: EM133105642

Assignment:

Prepare one python notebook (recommended- use Google Colab) to build, train and evaluate model (TensorFlow or TensorFlow.Keras library recommended) on the two datasets given below. Read the instructions carefully.

Question: Image Captioning : Image Captioning is the process of generating textual description of an image. It uses both Natural Language Processing and Computer Vision to generate the captions. The dataset will be in the form [image → captions]. The dataset consists of input images and their corresponding output captions.

Encoder

The Convolutional Neural Network(CNN) can be thought of as an encoder. The input image is given to CNN to extract the features. The last hidden state of the CNN is connected to the Decoder.

Decoder

The Decoder is a Recurrent Neural Network(RNN) which does language modelling up to the word level. The first time step receives the encoded output from the encoder and also the <START> vector.

1. Import Libraries/Dataset
2. Import the required libraries
3. Check the GPU available (recommended- use free GPU provided by Google Colab).

2. Data Processing

1. Read the pickle file and convert the data into the correct format which could be used for ML model.

Pickle file contains the image id and the text associated with the image.

\t -> separator between Image name and Image Caption A girl in a purple shirt hold a pillow . -> Image Caption

Corresponding image wrt image name can be found in the image dataset folder.

1. Plot at least two samples and their captions (use matplotlib/seaborn/any other library).

2. Bring the train and test data in the required format.

3. Model Building

4. Use Pretrained VGG model trained on ImageNet dataset (available publicly on google) for image feature extraction.

5. Create 3 layered GRU layer model and other relevant layers for image caption generation.

6. Add L2 regularization to all the GRU layers.

7. Add one layer of dropout at the appropriate position and give reasons.

8. Choose the appropriate activation function for all the layers.

9. Print the model summary.

4. Model Compilation
5. Compile the model with the appropriate loss function.
6. Use an appropriate optimizer. Give reasons for the choice of learning rate and its value.

7. Model Training
8. Train the model for an appropriate number of epochs. Print the train and validation loss for each epoch. Use the appropriate batch size.
9. Plot the loss and accuracy history graphs for both train and validation set. Print the total time taken for training.

10. Model Evaluation
11. Take a random image from google and generate caption for that image.

Q2) Let us define a sequence parity function as a function that takes in a sequence of binary inputs and returns a sequence indicating the number of 1's in the input so far; specifically, if at time t the 1's in the input so far is odd it returns 1, and 0 if it is even. For example, given input sequence [0, 1, 0, 1, 1, 0], the
parity sequence is [0, 1, 1, 0, 1, 1].

Implement the minimal vanilla recurrent neural network to learn the parity function. Explain your rationale using a state transition diagram and parameters of the network.

Evaluation Process -

1. Task Response and Task Completion- All the models should be logically sound and have decent accuracy (models with random guessing, frozen and incorrect accuracy, exploding gradients, etc. will lead to deduction of marks. Please do a sanity check of your model and results before submission).

2. There are a lot of subparts, so answer each completely and correctly, as no partial marks will be awarded for partially correct subparts.

3. Implementation- The model layers, parameters, hyperparameters, evaluation metrics, etc. should be properly implemented.

4. Notebooks without output will not be considered for evaluation.

5. Request to upload an HTML version of the jupyter notebook as well with all the outputs and comments.

Attachment:- Convolutional Neural Network.rar

Reference no: EM133105642

Questions Cloud

Whole organisation culture : Such a project has never been attempted across the whole organisation before, but you know that a few people in various divisions have done mini-projects relati
Compute the relative size of sales revenue : Compute the relative size of sales revenue from the four types of revenue Tesla discloses. (Hint: Scale each type of revenue by total revenue.)
Labor law and legislation project : Directions: There is a cacophony of Labor Cases in the Philippines because of Filipinos are really particular with work related concerns. Read and analyze the L
What was the tax on exercise date : Now 8/15/2021 that MNL's stock price is $40 per share, she intends to exercise all of her options. What was the tax on exercise date 8/15/2021
Train and evaluate model on the two datasets : Prepare one python notebook to build, train and evaluate model on the two datasets - reate 3 layered GRU layer model and other relevant layers for image
Five different positions in the bakery : You started a small bakery business ten years ago, along with your friend. A few years later, your friend left the business. Now, your bakery employs 500 people
How can one envision using the biopsychosocial assessments : 1. How can one envision using the biopsychosocial assessments tools as well as the concerns about the diagnosis of mental illness in your social work practice?
Prepare a profit statement for Swipe Limited : Swipe 50 sells Plus Swipes at €22 each. Prepare a profit statement for Swipe 50 Limited for the month of February and March using Variable costing
Social factors and definitions of normal behavior : 1. What are some of the social factors and definitions of normal behavior and its appropriate treatment? And. How might understanding these factors shape your a

Reviews

len3105642

3/16/2022 3:38:25 AM

Prepare one python notebook (recommended- use Google Colab) to build, train and evaluate model(TensorFlow or TensorFlow.Keras library recommended) on the two datasets given below. Read the instructions carefully.

Write a Review

Python Programming Questions & Answers

  Cumulative average for all the assignments

The program should output the students name, a letter grade for each assignment score, and cumulative average for all the assignments

  Write a function draw which prints a line of n occurrences

Write a function showMax(a, b, c) which prints the largest of distinct integers a, b, and c to the screen. Write an interactive script to test showMax.

  Calculate the sum of each value of n squared

Calculate the sum of each value of N squared from 0 up to and including N. The response paper should be in APA format, double spaced, hand-written.

  Write a program that reads a list directly from the user

Write a program that reads a list directly from the user, then removes duplicate top-level elements in it and prints out the resulting list.

  Display all of the scores entered and the total score

Ask the user in between each score if they want to continue (y/n). Display all of the scores entered and the total score at the end.

  Write a main function that creates the nodes

Write a main function that creates the nodes and constructs the tree given above. Then search for keys in the tree e.g. key = 5, as well as keys not

  Create a python application in Graphical User Interface

Create a python application in Graphical User Interface and You are also required to use at least two more authentication methods to gain access to portal

  Define and test these two python functions

Define and test these two Python functions. You must use recursion to define them: you are not allowed to use loops or local variables.

  Calculate a simulation approximation to the price

Calculate a simulation approximation to the price of a European put option by taking the average discounted payoff across all paths

  MATH2319 Machine Learning Assignment

MATH2319 Machine Learning Assignment Help and Solution - RMIT University, Australia - Assessment Writing Service

  Write the recursive function which checks the order property

A min-heap is a binary tree whose order property is that every node is strictly smaller than any of its childern. Write the recursive function is_min_heap.

  Prepare a program to output a random number

Write a program to output a random number, which is divisible by 5 and 7, between 0 and 10 inclusive using random module and list comprehension.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd