Created by: sneaxiy
clear_gradients
should be called after each backward call in test_imperative_star_gan_with_gradient_penalty
. The ut does not fail because gradient accumulation of leaf var nodes is not supported in the current dygraph implementation. Once we support gradient accumulation, this ut would fail.