Comments (7)
I had this problem too. I think the non-differentiability of sqrt at 0 is the culprit here. Adding a very small value before taking sqrt, or somehow avoid passing zeroes to sqrt, can help against NaNs.
from phasen.
可以先用sisnr预训练几步,初始化参数,然后在换成mixloss进行训练
from phasen.
大佬,我用的是Mixloss,一运行loss就 nan.
1、LR 我已经设置很小了(0.00001);
2、没有/0 情况;请问还有可能是什么原因呢?
This may be caused by the compressed coefficient \alpha, i.e., 0.3. You may as well calculate the gradient of the network output and you will get it.
from phasen.
我印象中之前也遇到过Nan,直观感觉是这个loss确实有点问题,和你的数据集和网络初始化有点关系,曾经试过只喂随机数,前几个step正常,然后就突然崩掉了确实也很奇怪。你换成sisnr应该就可以了正常训练,效果也是相差不大的。
from phasen.
可以先用sisnr预训练几步,初始化参数,然后在换成mixloss进行训练
我尝试先用sisnr预训练了几步,并使用第一次保存下的模型初始化,但是mix-loss依然为nan,请问您具体是怎么做的呢
from phasen.
I had this problem too. I think the non-differentiability of sqrt at 0 is the culprit here. Adding a very small value before taking sqrt, or somehow avoid passing zeroes to sqrt, can help against NaNs.
That works for me. I set the value to 1e-6 and I'm not sure what is appropriate to set the value.
from phasen.
I had this problem too. I think the non-differentiability of sqrt at 0 is the culprit here. Adding a very small value before taking sqrt, or somehow avoid passing zeroes to sqrt, can help against NaNs.
That works for me. I set the value to 1e-6 and I'm not sure what is appropriate to set the value.
I've been using 1e-12. Note that the square root of 1e-6 ends up being a much larger number, namely 0.001
from phasen.
Related Issues (10)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phasen.