Thanks for your reply. One more question is whether W will be updated along the training process? As in Keras, the W need to be added to self.trainable_weights = [self.W]? I do not know how to do this in PyTorch.