Comments (2)
looks like you are trying to load from "args.ckpt_path", which defines the model with 40 classes, while you created the model with 2. You either need to provide correct ckpt_path to the model with 2 classes (if it exists), or omit that path altogether
from light-weight-refinenet.
I am so sorry that I am a freshman for it, I just change NUM_CLASSES = [40] * 3 in this file(config.py) to NUM_CLASSES = [2] * 3 because of my train(val) datasets needed to be devided into 2 classes.
but it run,and error:
INFO:main: Loaded Segmenter 50, ImageNet-Pre-Trained=True, #PARAMS=27.31M
Traceback (most recent call last):
File "C:/Users/likun3/Documents/light-weight-refinenet-master/src/train.py", line 432, in
main()
File "C:/Users/likun3/Documents/light-weight-refinenet-master/src/train.py", line 367, in main
best_val, epoch_start = load_ckpt(args.ckpt_path, {'segmenter' : segmenter})
File "C:/Users/likun3/Documents/light-weight-refinenet-master/src/train.py", line 240, in load_ckpt
v.load_state_dict(ckpt[k])
File "D:\Soft\Anaconda_\envs\dp\lib\site-packages\torch\nn\modules\module.py", line 769, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for DataParallel:
size mismatch for module.clf_conv.weight: copying a param with shape torch.Size([40, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([2, 256, 3, 3]).
size mismatch for module.clf_conv.bias: copying a param with shape torch.Size([40]) from checkpoint, the shape in current model is torch.Size([2]).Could someone help me ? please~~~
Hi @LiKunWHU
I also met such an error now and don't know how to solve it! So, i want to ask whether you had solved it before? if so, can you tell me how you do?
Thank you very much!
Best Regards.
from light-weight-refinenet.
Related Issues (20)
- Having a hard time reproducing the results for NYU dataset HOT 4
- train mbv2 model HOT 2
- Error when importing miou_utils HOT 2
- LOSS meaniou no change HOT 3
- How does a single GPU run train?
- The following error occurs when changing a category to your own category HOT 2
- How to infer with my own trained model? HOT 3
- class dictionary HOT 4
- Cityscapes's Model
- RuntimeError: cuDNN error: CUDNN_STATUS_NOT_INITIALIZED HOT 2
- InvertedResidualBlock adding extra ConvBNReLU than the vanilla implementation HOT 1
- How to calculate FPS? HOT 4
- how to get the FLOPs? HOT 2
- Add CPU-only in serialization.py
- How to use ResNet-18 as backbone? HOT 2
- Visualizing the training process
- ./src/config HOT 2
- No datasets file
- Broken pipe HOT 5
- Some questions about transposing the data and results HOT 2
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 light-weight-refinenet.