# \[solved\] KeyError: 'unexpected key "module.encoder.embedding.weight" in state\_dict'

**URL:** <https://discuss.pytorch.org/t/solved-keyerror-unexpected-key-module-encoder-embedding-weight-in-state-dict/1686>\
**Category:** Uncategorized\
**Created:** [April 6, 2017, 8:11am UTC](https://discuss.pytorch.org/t/solved-keyerror-unexpected-key-module-encoder-embedding-weight-in-state-dict/1686 "2017-04-06T08:11:10Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![stoneyang](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/stoneyang/32/5962_2.png) [@stoneyang](https://discuss.pytorch.org/u/stoneyang)\
**Post date:** [August 3, 2018, 1:51pm UTC](https://discuss.pytorch.org/t/solved-keyerror-unexpected-key-module-encoder-embedding-weight-in-state-dict/1686/20 "2018-08-03T13:51:10Z")

</div>

Thanks for your hints! It saved [my time](https://discuss.pytorch.org/t/missing-keys-unexpected-keys-in-state-dict-when-loading-self-trained-model/22379/2)🌹

---

_[View the full topic](https://discuss.pytorch.org/t/solved-keyerror-unexpected-key-module-encoder-embedding-weight-in-state-dict/1686)._
