-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
autogradTasks towards the online training / automatic differentiation featureTasks towards the online training / automatic differentiation featuredocumentationImprovements or additions to documentationImprovements or additions to documentation
Description
Note: Found during this that one cannot use tensor_a = tensor_b(requires_grad=.true.)
when tensor_a
is only defined as a torch_tensor
. This is because the required_grad
property gets copied across, and then we get errors resulting from trying to modify the values of a tensor with requires_grad=.true.
. The solution is to declare tensor_a
as empty.
See pFUnit tests for optimizers, specifically the zero_grad test.
cc @jwallwork23
Originally posted by @jatkinson1000 in #320 (comment)
Metadata
Metadata
Assignees
Labels
autogradTasks towards the online training / automatic differentiation featureTasks towards the online training / automatic differentiation featuredocumentationImprovements or additions to documentationImprovements or additions to documentation