当前位置:网站首页>[deep learning][pytorch][original]crnn trains loss on the higher version of pytorch as a solution for Nan
[deep learning][pytorch][original]crnn trains loss on the higher version of pytorch as a solution for Nan
2022-06-24 11:14:00 【FL1623863129】
Recently, I have studied CRNN Various pytorch edition , I found that most of them were training problems , The typical problem is Loss Train a few epoch It becomes nan, So the project is github There are a lot of them , I'm using pytorch==1.7.0 edition , Then I found a good solution . Like what is said on the Internet to change the learning rate , Gradient cutting and so on all tried to be useless , He accidentally succeeded in a project and found out why he was right , Turned out to be CTCLoss Problems setting up the , In the high version pytorch Inside , Need to be in the initial CTCLoss When you add a parameter .
from torch.nn import CTCLoss
ctc_loss=CTCLoss(zero_infinity=True)
So there won't be loss by nan problem , And the test found that the model prediction was also normal , It seems that this method is feasible . If you encounter this kind of problem, you can try , If you find it useful, you can leave a message below .
边栏推荐
- Tencent's open source project "Yinglong" has become a top-level project of Apache: the former long-term service wechat payment can hold a million billion level of data stream processing
- I just did it! Visualization of character relationships in Douluo continent
- Besides technology, programmers also need to master a skill - self marketing ability
- math_ Summation and derivation of proportional series & derivation of sum and difference of equal powers / difference between two nth power numbers/
- [technical tutorial] national standard protocol platform easygbs cascading supports customized national standard channels
- 历史上的今天:图灵诞生日;互联网奠基人出生;Reddit 上线
- 09. Tencent cloud IOT device side learning -- RRPC and behavior
- Canvas infinite scan JS special effect code
- Reliable remote code execution (1)
- SwiftUI Swift 内功之 Swift 中的属性观察者 didSet 与 willSet
猜你喜欢

如何开发短信通知和语音功能医院信息系统(HIS系统)

Fashionable pop-up mode login registration window

程序员大部分时间不是写代码,而是。。。

Rising bubble canvas breaking animation JS special effect

Shell脚本(.sh文件)如何执行完毕之后不自动关闭、闪退?

把腾讯搬到云上,治愈了他们的技术焦虑

23. opencv - image mosaic project

SQL Server about like operator (including the problem of field data automatically filling in spaces)

math_ Summation and derivation of proportional series & derivation of sum and difference of equal powers / difference between two nth power numbers/

PHP短信通知+语音播报自动双呼
随机推荐
使用Process Monitor工具监测进程对注册表和文件的操作
math_等比数列求和推导&等幂和差推导/两个n次方数之差/
Preparation for a series of courses on WordPress applet generation
What is the function of the graphics card driver? Do you want to update the graphics card driver
Window function row in SQL Server_ number()rank()dense_ rank()
Common third-party UI frameworks
突然想到老家的木屋
math_ Summation and derivation of proportional series & derivation of sum and difference of equal powers / difference between two nth power numbers/
Maui's way of learning -- Opening
Centripetalnet: more reasonable corner matching, improved cornernet | CVPR 2020 in many aspects
MYSQL_精讲数据库数据类型
Code is really - omnipotent! Refuse to fight
Self cleaning Manual of mining Trojan horse
Why should we make the best use of the external chain in SEO?
Tencent wetest platform will bring new benefits in 2021 with 618 special offers!
Concise tutorial | making cartoon heat map with PPT - EFP graph?!
Tencent geek challenge small - endless!
Reliable remote code execution (1)
How to export only the titles in word documents? (i.e. delete all the text contents and keep only the title) stop B
Fashionable pop-up mode login registration window