When I was using VSCode, pylint always show some errors

When I was using VSCode with pylint, it told me

device = torch.device('cpu')

E1101:Module ‘torch’ has no ‘device’ member

and so is torch.randn

but it run successfully and I guess there is no error…

how can I fix this problem?

THANKS a lot!

20180822142637

1 Like

I don’t why…it shows some error but work well…

Try this:

1 Like