domenicodigangi / DynWGraphsPaper

Code for analysis of paper about dynmical sparse weighted graphs
MIT License
0 stars 1 forks source link

need to organize model's parameters' in a dictionary in pytorch style #4

Closed domenicodigangi closed 3 years ago

domenicodigangi commented 3 years ago

Parameters have been passed to optim functions as a vector, but that is not really needed in pytorch. Moreover organizing them in a parameters' dictionary would allow for a much easier stepwise optimization

domenicodigangi commented 3 years ago

should be handled automatically inheriting by torch.nn.Module and defining the parameters as torch.parameters

domenicodigangi commented 3 years ago

I have done it but then I went back to have parameters as normal torch tensors because I was having issues in extending the model from SS to Score driven. If I register a parameter as torch.nn.parameters in sequence class, and then whant to extend it to SD by defining a new class that inherits from it I need to inherit also the registeret parameters. That is an issue because they are then not straightforward to update in unrolling the SD filter