Solved by Eta_C in post #2 
              
              
                Do you mean weight is learnable and calculate y = tanh(weight) * x when learning? 
class LeNet(nn.Module):
    def __init__(self):
        super(LeNet, self).__init__()
        self.conv1 = nn.Sequential(
            nn.Conv2d(1, 6, 3, 1, 2,bias=False),
            nn.ReLU(),
            nn.MaxPool2…