# After torch::load model and predict, then got NaN

**URL:** <https://discuss.pytorch.org/t/after-torch-load-model-and-predict-then-got-nan/133142>\
**Category:** C++\
**Created:** [September 30, 2021, 2:23am UTC](https://discuss.pytorch.org/t/after-torch-load-model-and-predict-then-got-nan/133142 "2021-09-30T02:23:09Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![ptrblck](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/32/1823_2.png) [@ptrblck](https://discuss.pytorch.org/u/ptrblck)\
**Post date:** [September 30, 2021, 10:33am UTC](https://discuss.pytorch.org/t/after-torch-load-model-and-predict-then-got-nan/133142/4 "2021-09-30T10:33:26Z")

</div>

Thanks the the update! No, `double` shouldn’t be a problem.  
So it seems that the `fc1` layer already creates these large values. Could you check the `weight` and `bias` of this layer and post it here, please?

---

_[View the full topic](https://discuss.pytorch.org/t/after-torch-load-model-and-predict-then-got-nan/133142)._
