Comments (5)
The "size mismatch" error looks like its coming from the final classification layer. Did you set the num_classes
option to be the correct number of classes?
from efficient_densenet_pytorch.
Hi,
Yes, I have set the num_classes. I managed to have a training working with my images and resnet (adapting the resnet to the size of my images as described in pytorch/vision#155).
So my guess is that I get this error due to the custom size (80 x 80 pixels) of my images and I don't know how to adapt the densenet model for this image size.
I will keep looking,
Thanks,
Christophe
from efficient_densenet_pytorch.
My other guess is that its a pooling issue. The default settings (3 pooling blocks) will reduce a 32x32 image into 1x1 feature maps by the last layer. An 80x80 image might instead be reduced to 3x3 feature maps, which cannot directly be fed into the classifier without further pooling (or increasing the size of the layer).
from efficient_densenet_pytorch.
By trying different values, I found that setting the avgpool_size to 10 solves the problem.
Thanks for the assistance,
Christophe
from efficient_densenet_pytorch.
@chmaz Hi, I haven't seen this issue until now.
If you are going to test different size of images, I would recommend you using AdaptiveAvgPool2d or AdaptiveMaxPool2d instead of manually setting up the avgpooling size. I guess this would be much more convenient for you. :D
from efficient_densenet_pytorch.
Related Issues (20)
- Can we test using the trained model. HOT 1
- Inference time issue HOT 1
- New adaptive pooling layer. HOT 1
- Unable to run demo.
- How about the version of the torchvision, project killer and pyhon-fire? HOT 1
- Question: why use bn_function on 1x1 conv, not on 3x3 conv HOT 1
- dropout not in 3x3 convolutional layer
- What is bn_size? HOT 3
- 网络内存消耗?
- Is it possible to provide ImageNet pre-trained models? HOT 2
- Is this really memory efficient? HOT 1
- Is the normalizatin values for CIFAR-10 correct? HOT 1
- test error interpretation HOT 1
- How can I apply this to my own model? HOT 1
- AttributeError: module 'fire' has no attribute 'Fire' HOT 8
- The function received no value for the required argument: data HOT 2
- The BN running mean&var with torch.utils.checkpoint.checkpoint HOT 2
- will the inference memory reduced too? HOT 1
- Question about the place of checkpoint (shared memory allocation) HOT 1
- Excuse me, what is the cause of this problem? 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 efficient_densenet_pytorch.