Comments (6)
I did not run the models yet.
But I think I spotted the error: if you train using the script in this repo, then the model is being wrapped with nn.DataParallel - https://github.com/DrSleep/light-weight-refinenet/blob/master/src/train.py#L354
Now, when it happens, parameters' names in the state_dict have 'module.' before their original names.
In your inference script, you don't wrap the model with nn.DataParallel, hence the pre-trained weights are not actually loaded. You can see that by setting up strict=True
TL;DR in your inference script apply nn.DataParallel to your model before loading the weights.
from light-weight-refinenet.
that looks weird.
just to clarify: did you run the exactly same notebook code? and only changed the checkpoint file?
if so, I wonder if you can share the checkpoint file and the training log if possible.
from light-weight-refinenet.
Hi Vladimir,
Thanks for your reply.
Yes I run the code adapted from the notebook (mainly just copied and pasted). I can produce the right result figure with provided weights file. And I only changed the weights file then the result figure becomes horrible.
I packed related files (infer.py adapted from example notebook, training log and weights file) here https://drive.google.com/open?id=1SOf1CFudGdZ0Tf7OHASoBQu3ta22BJo-
can you please take a look?
Thanks a lot!
from light-weight-refinenet.
You're right. I made some mistakes in loading the weight file.
After fixing it, now I can get reasonably good prediction result (for ResNet50) as follows.
Thanks a lot for your help. I appreciate it a lot!
from light-weight-refinenet.
Hi@st2yang
Can you tell me what you had changed to solve you issue? and the link "https://drive.google.com/open?id=1SOf1CFudGdZ0Tf7OHASoBQu3ta22BJo-" provided by you can't to be opened now, so i also don't know what you have changed!
Thank you very much.
Best Regards.
from light-weight-refinenet.
@xiaoyuamw You can refer to Vladimir's response above or this repo https://github.com/choicelab/grasping-invisible.
As far I can remember, I just warp the model with nn. DataParallel
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.