I want to change weights on my own
class Net(nn.Module):
def init(self):
super(Net, self).init()
self.F = torch.randint(0,255,(len(train_dataset),image_size))
self.I =torch.ones(image_size,image_size)
self.w = 0.00001
self.rnn = nn.RNN(image_size,len(train_dataset),1,‘relu’)
self.rnn.weight_hh_l[0] = torch.t(self.F)
self.rnn.weight_ih_l[0] = (self.I - (self.w * torch.mm(torch.t(self.F),self.F)))
And have error
AttributeError: 'RNN' object has no attribute 'weight_hh_l'
What I’m doing wrong? Thank you in advance