caiusdebucean:

class Custom(nn.Module): def init(self, weights = 1, dim = 1): super().init() self.weights = weights def forward(self, input): a = 2 x = input y = a + math.log(x) return y


Thanks for your reply. I’ve tried similar changes.
Now it seems to show
TypeError: 'int' object is not callable