layer quant_conv2d_58 expects 2 weights, but the saved weights have 1 elements
See original GitHub issueDescribe the bug
I use Keras to save, then load weights. I got this error
ValueError: Layer #144 (named "quant_conv2d_58" in the current model) was found to correspond to layer quant_conv2d_58 in the save file. However the new layer quant_conv2d_58 expects 2 weights, but the saved weights have 1 elements.
To Reproduce
Expected behavior
Am I missing any config when load weights?
Environment
Ubuntu 18.04 Python 3.6.9 TensorFlow version: tensorflow-gpu 1.15.0 Larq version: larq 0.8.2
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
ValueError: Layer #4 (named "predictions") expects 2 weight(s ...
ValueError: Layer #4 (named "predictions") expects 2 weight(s), but the saved weights have 0 element(s). prediction code
Read more >Save and load models | TensorFlow Core
An index file that indicates which weights are stored in which shard. If you are training a model on a single machine, you'll...
Read more >Error training Faster RCNN model - NVIDIA Developer Forums
') ValueError: Layer #4 (named "block_1a_conv_1") expects 1 weight(s), but the saved weights have 2 element(s). I am also getting the same error ......
Read more >Keras load pre-trained weights. Shape mismatch
I have some trouble loading pre-trained weights with Keras. Let's say I have a keras model model and that my weights are stored...
Read more >Keras- compatibility between Model architecture and saved ...
I saved weights of a fine tuned model with last layer having only two outputs. I could not save the structure of fine...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great! I’ll close this issue for now; if you run into any other problems, feel free to reopen.
Sounds good, let me know if this works 👍