Hi,
I want to define my layer matrix. In my defined layer, I have a diagonal matrix which its parameters are on its diameter. I tried the following way, but it didn’t work. Is there any way I can define something like this?
self.weight = Parameter(torch.diag(torch.FloatTensor(1, nparam)))

Thanks