Open ZisIsNotZis opened 5 years ago
Thank you very much!! It works
When I change line 182 to:
most_likely_words = np.argsort(word_probabilities)[-self.beam_size][::-1]
I get:
IndexError: invalid index to scalar variable.
Did anyone face this or know how to solve it?
Edit
I changed line 182 to:
most_likely_words = np.argsort(word_probabilities)[::-1]
and that worked for me.
Please fix this @cshallue. Thank you.
Hi There, We are checking to see if you still need help on this, as this seems to be an old issue. Please update this issue with the latest information, code snippet to reproduce your issue and error you are seeing. If we don't hear from you in the next 7 days, this issue will be closed automatically. If you don't need help on this issue any more, please consider closing this.
The problem is not fixed yet.
System information
Describe the problem
Line 182 in
caption_generator.py
ofim2txt
should be[-self.beam_size:]
instead of[:-self.beam_size]
, since the comment above explicitly says the "lastbeam_size
elements".run_inference
will output length 1 description without this, likewhile it will output much more "normal" output with this:
Source code / logs
N/A