gaozhihan / gaozhihan/PreDiff

Timing to call .zero_grad()

Open
#32 1 comment 0 reactions 1 assignee Claimed by @gaozhihan View on GitHub
bug
Dominant language
Python
Stars
159
Forks
10
PR merge metrics
No merged PRs in 30d

Description

I noticed that you call .zero_grad() outside the IF condition in your VAE training script (line 454 & 467). Shouldn't we call it after .step() in IF condition? Otherwise the accumulated gradient in computation graphs will be erased.

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.