Open wtomin opened 3 years ago
As it says in the README, this repo has been superseded by https://github.com/Lezcano/geotorch Have you tried with the tools in that repo?
Even more, in master
the torch.nn.utils.parametrizations.orthogonal
(to be released in PyTorch 1.11 soon) will bring an improved version of this as well.
Hi, authors. Thanks for providing this repo.
I'm currently using the Orthogonal module and define it as part of my model weights. When I tried to resume training from a checkpoint, an unexpected error occurred when I executed "load_state_dict":
rotation_matrices
is the name of the Orthogonal object. I think the error ocurred because when the model is initialized,rotation_matrices._B=None
, so that the_B
weights in thestate_dict
cannot be loaded.I tried two methods to solve this problme, but both failed.
Retract
_B
beforeload_state_dict
:At this point, it did not raise error. The error occurred when running backprogation
loss.backward()
load_state_dict(state_dict, strict=False)
Instead of re-defining_B
, I change thestrict
argument fed intoload_state_dict
. The error occurred when executingloss.backward()
:I feel like it has something to do the optimizer. Could you give me some suggestions?