Getting one word as caption with zero probability using pretrained checkpoints for image captioning-im2txt

0 votes

I am using pre-trained 2M checkpoints for im2txt. I am getting one word as captions as below. I am using tensorflow version 1.0 Ubuntu 16.04

0)     (p=0.000000)
1)the  (p=0.000000)
2)two  (p=0.000000)

I am expecting a complete sentence but got an irrelevant one-word caption

Feb 25, 2022 in Machine Learning by surbhi
• 3,820 points
677 views

1 answer to this question.

0 votes

Under caption_generator.py

change the following line as follow

        most_likely_words = np.argsort(word_probabilities)[-self.beam_size:][::-1]

If the problem persists, try using a checkpoints file that has been updated with the newest code.

answered Feb 27, 2022 by CoolCoder
• 4,420 points

Related Questions In Machine Learning

0 votes
1 answer

Getting one word as caption with zero probability using pretrained checkpoints for image captioning-im2txt

captiongenerator.py is a Python script that generates ...READ MORE

answered Mar 17, 2022 in Machine Learning by Dev
• 6,000 points
519 views
0 votes
1 answer

Keras image binary classification, which class is assigned probability 0 and 1 ? Using Functional API

Not exactly.  If your sigmoid output was ...READ MORE

answered Mar 7, 2022 in Machine Learning by Dev
• 6,000 points
1,724 views
0 votes
1 answer
0 votes
1 answer

Simple algorithm for generating random numbers with bigger/smaller probability

To move the density in one way, ...READ MORE

answered Apr 4, 2022 in Machine Learning by Nandini
• 5,480 points
2,218 views
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP