harvardnlp/namedtensor

Dealing with nn.Parameter

srush opened this issue · 1 comments

srush commented

@da03

Now that we have ntorch.nn what if we overload some of the parameter functions?

class MyMod(ntorch.nn.Module):
...

And then internally if you do

self.register_named_parameter("w", ntorch.tensor())

it makes a self.w_param ?

da03 commented

yeah sounds good