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

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

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