Comments (8)
This model is made for CIFAR, which is (3, 32, 32), so the last avg pooling operation will not coincide for bigger input. You can just change it for .mean(-1).mean(-1). It will do the same as average pooling but without complaining about the image size.
from resnext.pytorch.
I can't get the point you say. Could you please explian it?
x = self.conv_1_3x3.forward(x)
x = F.relu(self.bn_1.forward(x), inplace=True)
x = self.stage_1.forward(x)
x = self.stage_2.forward(x)
x = self.stage_3.forward(x)
x = F.avg_pool2d(x, 8, 1)
x = x.view(-1, self.stages[3])
return self.classifier(x)
Do you mean the 'F.avg_pool2d(x,8,1)' ???
from resnext.pytorch.
Yes! Just change it by x.mean(3).mean(2)
from resnext.pytorch.
I replace the avg_pool with 'x=x.mean(-1).mean(-1)', but it doesn't work. Did I misunderstand your suggestion? BTW, the error shows that "cuda out of memory", and it shows the error in the stage_1.forward.
from resnext.pytorch.
Well, that's another matter. Can you try with batch_size = 1?
from resnext.pytorch.
It sill doesn't work!
the error is :
ValueError: Expected input batch_size (441) to match target batch_size (1).
from resnext.pytorch.
And I resize the img to (3,32,32) and it works.
from resnext.pytorch.
If you do:
model(image)
where image is of size (1, 3, 112, 112), it should work.
from resnext.pytorch.
Related Issues (18)
- Questions about the performances. HOT 23
- GPU memory usage during training HOT 1
- Pretrained model link broken HOT 4
- Sublinear speed-up with dataparallel HOT 1
- Is the D right ? HOT 6
- About initial learning rate HOT 2
- The structure problem
- cannot run inference mismatch sizes HOT 2
- Could you provide the ResNeXt of Caffe version ?
- RuntimeError: Error(s) in loading state_dict for CifarResNeXt: HOT 1
- Can I directly convert TensorFlow's ResNext weight to pytorch's weight and use it directly? HOT 2
- question about the dimension of the net HOT 4
- GPU memory usage HOT 1
- Question about the number of channels HOT 4
- OSError: [Errno 12] Cannot allocate memory HOT 13
- sizes do not match HOT 1
- TypeError: tensor(0, device='cuda:0') is not JSON serializable HOT 3
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 resnext.pytorch.