Comments (5)
I have solved this problem, but I have a new problem, I want to know what the extracted image feature dimension is 2048 (10-100)?
Because when I use the extracted image features to train the model, the following problem arises
RuntimeError: stack expects each tensor to be equal size, but got [100, 10] at entry 0 and [100, 18] at entry 1
from bottom-up-features.
Hi. It outputs 10-100 features (1 for each detected object), so the value will differ for each image.
from bottom-up-features.
So how do I use these features in the dataloader function? Because the following error was reported in the program
Traceback (most recent call last):
File "E:/vizwiz-vqa/mcan-vqa-master/run.py", line 155, in
execution.run(__C.RUN_MODE)
File "E:\vizwiz-vqa\mcan-vqa-master\core\exec.py", line 513, in run
self.train(self.dataset, self.dataset_eval)
File "E:\vizwiz-vqa\mcan-vqa-master\core\exec.py", line 149, in train
for step, (
File "C:\Users\KAI.conda\envs\fw\lib\site-packages\torch\utils\data\dataloader.py", line 521, in next
data = self._next_data()
File "C:\Users\KAI.conda\envs\fw\lib\site-packages\torch\utils\data\dataloader.py", line 561, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "C:\Users\KAI.conda\envs\fw\lib\site-packages\torch\utils\data_utils\fetch.py", line 52, in fetch
return self.collate_fn(data)
File "C:\Users\KAI.conda\envs\fw\lib\site-packages\torch\utils\data_utils\collate.py", line 84, in default_collate
return [default_collate(samples) for samples in transposed]
File "C:\Users\KAI.conda\envs\fw\lib\site-packages\torch\utils\data_utils\collate.py", line 84, in
return [default_collate(samples) for samples in transposed]
File "C:\Users\KAI.conda\envs\fw\lib\site-packages\torch\utils\data_utils\collate.py", line 56, in default_collate
return torch.stack(batch, 0, out=out)
RuntimeError: stack expects each tensor to be equal size, but got [100, 14] at entry 0 and [100, 11] at entry 1
进程已结束,退出代码1
from bottom-up-features.
Can you provide some reference code to load these features?
from bottom-up-features.
You can pad all the features to the max size (100 in this case) with 0. That's what they do in the original MCAN model: code (in proc_img_feat function)
from bottom-up-features.
Related Issues (18)
- Hi, is your pretrained model the same as in original paper? both trained on Visual Gnome? HOT 6
- error while running sh make.sh HOT 1
- error running sh make.sh HOT 4
- .npz file HOT 2
- Download the pretrained model HOT 1
- torch.jit.frontend.NotSupportedError: slicing multiple dimensions at the same time isn't supported yet HOT 12
- evaluation results HOT 1
- Display Features HOT 10
- pretrained model for fixed 36 features per image
- How can I extract the features using 2000 classes (1600 objects +400 attributes) ? HOT 4
- Batches with multiple images implementation HOT 2
- Lion and tiger HOT 6
- Error when running make.sh HOT 1
- Does the use the attributes? HOT 3
- How to convert caffe model to pytorch model? HOT 2
- torch.utils.ffi is deprecated
- trained with faster rcnn and backbone resnet152? HOT 1
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 bottom-up-features.