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

Mar 14, 2022 in Machine Learning by Nandini
• 5,480 points
274 views

1 answer to this question.

0 votes

captiongenerator.py is a Python script that generates captions.
Replace the ensuing line with the following

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

Still, try using a checkpoints train that has been streamlined with the newest law, If the problem persists. 

answered Mar 17, 2022 by Dev
• 6,000 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

Under caption_generator.py change the following line as follow ...READ MORE

answered Feb 27, 2022 in Machine Learning by CoolCoder
• 4,400 points
291 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
1,683 views
0 votes
1 answer

Handling Imbalanced dataset

This usually occurs when a vast set ...READ MORE

answered Oct 17, 2018 in Data Analytics by kurt_cobain
• 9,390 points
548 views
0 votes
0 answers

Hello I have some errors while implementing variational autoencoder

def dense_layers(sizes): return tfk.Sequential([tfkl.Dense(size, ...READ MORE

May 19, 2019 in Machine Learning by anonymous

edited May 20, 2019 by Omkar 1,187 views
0 votes
1 answer

Pycharm error: could not find a version that satisfies the requirement

Check the python version installed. Tensorflow is ...READ MORE

answered May 29, 2019 in Data Analytics by Zulaikha
• 910 points
2,807 views
0 votes
1 answer

keras model.fit_generator() several times slower than model.fit()

You may want to check out the ...READ MORE

answered May 31, 2019 in Python by SDeb
• 13,300 points
2,808 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,480 views
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