Comments (4)
if you set the train loader to drop_last=True
, you will not face this problem. 16*13=208, leaving one image behind, should not work for 16/13 but should had work for 13.
@VainF ,
I think it will be best if you set the train loader to drop_last=True
just in case. Edit line: https://github.com/VainF/DeepLabV3Plus-Pytorch/blob/master/main.py#L236
Currently, pytorch batchnorm for training is not smart enough to ignore single batch size with single value feature map and some user will face this problem if their batch size has a remainder of 1 from the dataset.
For example, building a bigger backbone, I was forced to use batch_size=2 and on cityscapes, the error will pop up as the train set has 2975 images (leaving a remainder of 1 at the last load which causes the error).
from deeplabv3plus-pytorch.
Hi @ynjiun, please make sure that batch size>1 for training mode.
from deeplabv3plus-pytorch.
Hi VainF,
Thank you for your response. It turns out that for unknown reason if the batch_size is 16 or 15 or 13, it will report the error. But if I set batch_size 14 or 12, then it works. I don't know why. Any insights?
from deeplabv3plus-pytorch.
Fixed! Thanks for your help.
from deeplabv3plus-pytorch.
Related Issues (20)
- video
- Some advice on GPU choice?
- I have three categories, but my class IOU only has two
- New additional classes not training HOT 3
- RuntimeError: The size of tensor a (125) must match the size of tensor b (126) at non-singleton dimension 3
- The size of tensor a (125) must match the size of tensor b (126) at non-singleton dimension 3' will appear during the validation phase HOT 1
- When I use a model with plus, the following error always occurs
- how can I write the argument ("--input") in predict.py
- distributed training error
- ONLY TRIANED ON A SUNGLE GPU
- How to run train.py
- about dice loss
- How to use this model on iOS?
- Issue with Multi-GPU Training/Predicting using --gpu_id
- Visualization of training results
- Wrong File Name in best_deeplabv3plus_resnet101_cityscapes_os16 HOT 3
- predict
- MobileNetV2 Width_mult
- hrnet_48 pretrain model
- How To Test On Cityscapes
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 deeplabv3plus-pytorch.