How to fix “ 'tensor' is not callable”?

I want to generate t.nn.Parameter type weights through for loop, but the self.weights list can only get one element, with the warning in Pycharm “‘tensor’ is not callable”.

for w in weights[:-1]:
            self.weights += [t.nn.Parameter(t.tensor([w], requires_grad=True))]

The error looks strange. Are you sure the error is thrown in this line of code?
What did you store in weights?

Sorry, I made some mistakes. Thanks for your reply, and I will close this problem.