Comments (3)
Greetings! Can you please provide the whole error description. Probably is a size missmatch of tensors.
from defhtr.
Thanks for your reply, the following is the whole error description.
net.load_state_dict(torch.load('cnn_df.pt')) File "D:\Program Files\anaconda3\envs\pytorch-gpu-1.11\lib\site-packages\torch\nn\modules\module.py", line 1497, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for HTRNetC: Unexpected key(s) in state_dict: "features.features.cnv1.stn.cnn.0.weight", "features.features.cnv1.stn.cnn.0.bias", "features.features.cnv1.stn.last.weight", "features.features.cnv1.stn.last.bias", "features.features.cnv2.stn.cnn.0.weight", "features.features.cnv2.stn.cnn.0.bias", "features.features.cnv2.stn.last.weight", "features.features.cnv2.stn.last.bias", "features.features.cnv3.stn.cnn.0.weight", "features.features.cnv3.stn.cnn.0.bias", "features.features.cnv3.stn.last.weight", "features.features.cnv3.stn.last.bias", "features.features.cnv4.stn.cnn.0.weight", "features.features.cnv4.stn.cnn.0.bias", "features.features.cnv4.stn.last.weight", "features.features.cnv4.stn.last.bias", "features.features.cnv5.stn.cnn.0.weight", "features.features.cnv5.stn.cnn.0.bias", "features.features.cnv5.stn.last.weight", "features.features.cnv5.stn.last.bias", "features.features.cnv6.stn.cnn.0.weight", "features.features.cnv6.stn.cnn.0.bias", "features.features.cnv6.stn.last.weight", "features.features.cnv6.stn.last.bias", "features.features.cnv7.stn.cnn.0.weight", "features.features.cnv7.stn.cnn.0.bias", "features.features.cnv7.stn.last.weight", "features.features.cnv7.stn.last.bias", "features.features.cnv8.stn.cnn.0.weight", "features.features.cnv8.stn.cnn.0.bias", "features.features.cnv8.stn.last.weight", "features.features.cnv8.stn.last.bias", "features.features.cnv9.stn.cnn.0.weight", "features.features.cnv9.stn.cnn.0.bias", "features.features.cnv9.stn.last.weight", "features.features.cnv9.stn.last.bias", "features.features.cnv10.stn.cnn.0.weight", "features.features.cnv10.stn.cnn.0.bias", "features.features.cnv10.stn.last.weight", "features.features.cnv10.stn.last.bias".
And I did not reproduce the accuracy published in the paper, could you please share the hyperparameters setting in the experiment?
from defhtr.
The error indicates that the saved model has enabled the STN submodule. You can try the definition of the model with stn=True and check if this works alright.
from defhtr.
Related Issues (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 defhtr.