I just noticed a warning due to the use of loss.backward(retain_variables=True)
: "UserWarning: retain_variables option is deprecated and will be removed in 0.3. Use retain_graph instead.
warnings.warn("retain_variables option is deprecated and will be removed in 0.3. "
I understand that gradients are typically for one-time update and are discarded to release memory without specifying retain_variables=True
. What’s the motivation for removing this API? Will there be some alternative in 0.3?