Comments (3)
Hi,
Thank you for your messages. You seem to have seq_preds, seq_attns, seq_log_probs
as empty lists. These lists are formed as soon as the EOS
token is generated. See line 212 if torch.any(seqs_end):
So, I think your conclusion is correct. The generated captions aretoo long, and the EOS is never generated.
To solve this issue, you may get predictions and attention from current_preds
and attns
tensors and sort them based on the log_prob_topk
tensor if seq_preds
is empty.
Thank you for pointing this out. I did not face this issue, but I think the code logic should take care of such a condition.
from image_captioning_with_transformers.
A quick update, I found out it was caused by predicted caption being too long.
Probably because I didn't trained my model well enough, but still, is there any way to prevent this from happening when inferencing?
from image_captioning_with_transformers.
Hi,
I know it's a bit late, but how did you solve that @stanthemaker ?
Thank you.
from image_captioning_with_transformers.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from image_captioning_with_transformers.