jef:

W = torch.rand(3 * embd_dim).type(torch.DoubleTensor).view(1, -1) # must be trainable params


For training, just using nn.Parameter() is solution for trainable params like this?
W = nn.Parameter(torch.rand(3 * embd_dim).type(torch.DoubleTensor).view(1, -1) # must be trainable params)