densecap-tensorflow
densecap-tensorflow copied to clipboard
ValueError: cannot copy sequence with size 11 to array axis with dimension 10
Hi, when I train the model with version 1.2 of Visual Genome Dataset. An error appears:
Traceback (most recent call last):
File "/home/XXX/Documents/densecap-tensorflow/tools/train_net.py", line 215, in
Some describe words of bounding boxes are more than 10 words. Then I update the __C.MAX_WORDS to be 15, similar error appear. How can I set the parameter of __C.MAX_WORDS? Does anyone else meet this problem?
What the MAX_WARDS
is when you preprocessing the dataset with preprocess.py
? One solution may be preprocessing the dataset again with setting the proper MAX_WORDS
.
best,
problem is that, in caption there can be any number of words but the model can use a certain limit of words that is MAX_WORDS. I increase the word limit but the error remains same for some other caption so you can do two things.
- increase limit (like 25 or 30) because no caption has more than 20 words. but it will be computational expensive and also affect the result.
- during preprocessing the data limit captions to 8 words. because SOS and EOS are two additional keywords.
I have done the second approch and my result was same.