clab / clab/dynet

auto batching example borken

Open
#1,272 4 comments 0 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

The offical [autobatching](http://dynet.readthedocs.io/en/latest/tutorials_notebooks/Autobatching.html?highlight=esum) example can't correctly, when runing it , this error occured.

> RuntimeErrorTraceback (most recent call last)
> in ()
> 19 sum_of_losses += loss.npvalue()
> 20 loss.backward()
> ---> 21 trainer.update()
> 22 print sum_of_losses / 3
> 23 sum_of_losses = 0.0
>
> _dynet.pyx in _dynet.Trainer.update()
>
> _dynet.pyx in _dynet.Trainer.update()
>
> RuntimeError: Magnitude of gradient is bad: -nan

I ran this example directly from [offical jyputer-tutorials](https://github.com/clab/dynet/blob/5049e5995f169fe1798139e1ca4dc98a7c0c4317/examples/jupyter-tutorials/Autobatching.ipynb).

Actually I had ran into trouble that the result differ from autobatching or not, and enable GPU(1070) made program 10 times slow. So I really needs an proofed benchmark

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.