Skip to content

Instantly share code, notes, and snippets.

@ericmjl
Created December 26, 2018 21:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericmjl/8ecf5c9f5d1bf4622949dd1d8ad2428f to your computer and use it in GitHub Desktop.
Save ericmjl/8ecf5c9f5d1bf4622949dd1d8ad2428f to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mitmul
Copy link

mitmul commented Jan 8, 2019

losses.append(loss)

should be

losses.append(float(loss.array))

Otherwise, the Variable objects will be kept and consume a lot of memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment