Click here to Skip to main content
15,908,661 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
there are 3 tasks in the above URL.


1. Add the tokenize to your class CaptionDataset(Dataset) object so that the getitem function will return the image and tokenized text data.
2. Think about how you encoded the captions, and finish the forward function implementation.
3. Make image captioning with the model you trained, by taking the inputs from the validation dataset, you should create the sample function to make predictions.

What I have tried:

I have tried to solve it but the code is not working
Posted
Updated 16-May-24 9:38am
v7
Comments
Richard Deeming 14-May-24 8:00am    
Nobody here is going to do your homework for you, even if you had bothered to provide the details here rather than dumping a malformed link to the problem in the question subject.

Update your question and explain precisely what you are trying to do, what you have tried, and where you are stuck. Include the relevant parts of your code, and the full details of any errors.
Dave Kreskowiak 16-May-24 16:48pm    
Rolled back to original question. Your attempt at hiding it will not succeed.

1 solution

Richard's comment to you is more important than you might think. Suppose we do the work for you, and write the code for you, what would you actually learn from this? You certainly wouldn't have learned the thought process behind how we would solve the problem. Without understanding the thought process, you won't be able to assess whether or not this is the best solution for your problem. You certainly wouldn't understand whether there are situations where the code is going to fail and, if it does, you aren't going to be able to fix the issues.

Now suppose that the person who fixes your code isn't very good. They write code for you that is badly implemented, of poor quality, and close to being completely useless. What are you going to learn from that, other than bad habits, bad practices, and bad code. If you are looking to make a career in development, you are saying that you are satisfied with what might be poor code.

You have a wonderful opportunity to figure these problems out for yourself and to expand your understanding and knowledge. If you take advantage of this, by all means come back and ask about particular pieces of code that you are having issues with. Show us the code, explain the problem and tell us what you have already tried to fix it. This is your opportunity to be incredible. Don't waste it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900