leaderj1001 / BottleneckTransformers

Bottleneck Transformers for Visual Recognition
MIT License
274 stars 50 forks source link

the height of the picture is 256 and the width is 128 #1

Open Shsanctury opened 3 years ago

Shsanctury commented 3 years ago

Hello, the height of the picture is 256 and the width is 128. It will report an error.What should I change in the code?

leaderj1001 commented 3 years ago

Thanks for comments !

Today, the code updated. You need to set a resolution parameters. Example below:

from model import Model

model = ResNet50(num_classes=1000, resolution=(128, 256))
x = torch.randn([2, 3, 128, 256])
print(model(x).size())

Thanks

Shsanctury commented 3 years ago

really appreciate your help !