We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
您好,请问您使用https://github.com/facebookresearch/grid-feats-vqa提取的特征维度是固定的吗?我使用[extract_grid_feature.py]提取得到的特征维度不同,所以在batch size训练时,会出现RuntimeError: stack expects each tensor to be equal size, but got [1, 2048, 18, 32] at entry 0 and [1, 2048, 19, 29] at entry 1
The text was updated successfully, but these errors were encountered:
提取之后用pytorch的adaptive average pooling都pooling成7*7的就可以了
Sorry, something went wrong.
但是提取的是四维的,我不太清楚怎么才能转换成(49,2048),能求一下您当时提取grid特征的源码吗?
转化很简单,比方说先用AaptiveAvgPooling2D把[1,2048,18,32]变成[1,2048,7,7],然后维度顺序换一下BCHW->BHWC 变成[1,7,7,2048],然后前三维合并一下就是49*2048了
谢谢您的回复,祝您生活愉快
No branches or pull requests
您好,请问您使用https://github.com/facebookresearch/grid-feats-vqa提取的特征维度是固定的吗?我使用[extract_grid_feature.py]提取得到的特征维度不同,所以在batch size训练时,会出现RuntimeError: stack expects each tensor to be equal size, but got [1, 2048, 18, 32] at entry 0 and [1, 2048, 19, 29] at entry 1
The text was updated successfully, but these errors were encountered: