I have some problems when writing PyTorch code in IDE.
Why doesn’t PyCharm or any other IDE have any autocomplete note when I code the parameters of a Variable class? For example,
when I type
x = Variable(a, requi
it doesn’t have any autocomplete note about ‘requires_grads=’.
I’ve once looked the source code of the ‘Variable’ class and found it didn’t have ‘__ init __’. I’m curious about this.
Another problem is why the IDE says the python list in the parentheses is unexpected when I code
a = torch.FloatTensor([1.0, 1.0])
but when I run this piece of code and print(a), it runs successfully and prints the correct result without any error