# DestVI Tensor Nan Error

**URL:** <https://discourse.scverse.org/t/destvi-tensor-nan-error/502>\
**Category:** scvi-tools\
**Tags:** scvi, destvi\
**Created:** [June 1, 2022, 6:27am UTC](https://discourse.scverse.org/t/destvi-tensor-nan-error/502 "2022-06-01T06:27:01Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![frankchen121212](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/frankchen121212/32/262_2.png) [@frankchen121212](https://discourse.scverse.org/u/frankchen121212)\
**Post date:** [June 14, 2022, 12:03pm UTC](https://discourse.scverse.org/t/destvi-tensor-nan-error/502/6 "2022-06-14T12:03:12Z")

</div>

Hi, Thank you very much for your kind assistance!

Regarding the DestVI nan errors, I’ve made an effort to add the var\_names into the scRNA data and the ST data. However, the problem still exists.One researcher suggests a smaller learning\_rate. While a smaller learning rate doesn’t solve the problem.

> [@Error on scvi\_model.train(100) for seed label transfer](https://discourse.scverse.org/t/error-on-scvi-model-train-100-for-seed-label-transfer/285/2):
>
> It seems you have faced the problem of exploding gradients (which has been mentioned elsewhere: [DestVI Tensor Nan Error](https://discourse.scverse.org/t/destvi-tensor-nan-error/502)). Let’s use smaller learning\_rate to see if it can help troubleshoot the problem. Best,

The jupyter notebook and the dataset in h5ad format are lately updated in the following link.

[https://drive.google.com/drive/folders/1u0tJUsZj3bmbn3MNoywoRBLYboaW15gD?usp=sharing](https://drive.google.com/drive/folders/1u0tJUsZj3bmbn3MNoywoRBLYboaW15gD?usp=sharing)

Hope that you can help me, thank you!

---

_[View the full topic](https://discourse.scverse.org/t/destvi-tensor-nan-error/502)._
