# How can i convert model's parameter data type to Double?

**URL:** <https://discuss.pytorch.org/t/how-can-i-convert-models-parameter-data-type-to-double/886>\
**Category:** Uncategorized\
**Created:** [March 5, 2017, 10:02am UTC](https://discuss.pytorch.org/t/how-can-i-convert-models-parameter-data-type-to-double/886 "2017-03-05T10:02:12Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Marwan\_Elghitany](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/marwan_elghitany/32/27251_2.png) [@Marwan\_Elghitany](https://discuss.pytorch.org/u/Marwan_Elghitany)\
**Post date:** [August 12, 2021, 7:04am UTC](https://discuss.pytorch.org/t/how-can-i-convert-models-parameter-data-type-to-double/886/4 "2021-08-12T07:04:10Z")

</div>

Convert Your Data to float instead … as it’s [very dangerous to convert model type to Double …](https://discuss.pytorch.org/t/problems-with-target-arrays-of-int-int32-types-in-loss-functions/140/3) as GPUs are not good at double precision computation  
Try:

```python
X_train = torch.FloatTensor(X_train)

```

instead

---

_[View the full topic](https://discuss.pytorch.org/t/how-can-i-convert-models-parameter-data-type-to-double/886)._
