generative-models
generative-models copied to clipboard
Weight sharing
Hi, Can you explain why multiply 0.5 from gradient ?
# Average the gradients
for p in D_shared.parameters():
p.grad.data = 0.5 * p.grad.data