Hi
How can I pass weights from the previous layer to the next layer?
Namely, I want to do dynamic parameter passing
I tried this strategy, but it doesn’t work. I get error ValueError: optimizer got an empty parameter list
def __init__(self):
    self.register_parameter('weight', None)
def reset_parameters(self, input):
    self.weight = nn.Parameter(input)    
def forward(self, input):
    if self.weight is None:
        self.reset_parameters(input)
    return self.weight