clab / clab/dynet

RuntimeError: Magnitude of gradient is bad: inf

Open
#1,382 7 comments 2 reactions 0 assignees View on GitHub
need more info
Dominant language
C++
Stars
3.4k
Forks
701
PR merge metrics
No merged PRs in 30d

Description

This happens occasionally (once every 20~ runs), stopping my training process:

> RuntimeError: Magnitude of gradient is bad: inf

I have not yet managed to replicate this reliably.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by investigating the reported “Magnitude of gradient is bad: inf” RuntimeError in the training path. The report provides no file, test, or reliable reproduction, so first try to capture the failure and identify the relevant gradient-validation entry point. Done would mean reproducing the failure reliably and establishing a verified fix or clear diagnosis.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
machine-learning
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.