Is your feature request related to a problem? Please describe.
torch.nn.utils.parametrize relies on dynamically sub-typing modules (including e.g. ComplexTensor types) which fails because Tensorly has a very unusual requirement: putting a name kwd-arg in all sub-classes definition.
Describe the solution you'd like
This name kwd-arg shouldn't be mandatory, you can simply set the default to the sub-class's __name__ attribute which is already provided in every standard class definition. This will allow compatibility with this core pytorch module, reduce definition verbosity, developer surprises, and maintain backwards compatibility.
Is your feature request related to a problem? Please describe.
torch.nn.utils.parametrizerelies on dynamically sub-typing modules (including e.g.ComplexTensortypes) which fails because Tensorly has a very unusual requirement: putting anamekwd-arg in all sub-classes definition.Describe the solution you'd like
This
namekwd-arg shouldn't be mandatory, you can simply set the default to the sub-class's__name__attribute which is already provided in every standard class definition. This will allow compatibility with this core pytorch module, reduce definition verbosity, developer surprises, and maintain backwards compatibility.