Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pycharm/Pytorch - 'tensor' is not callable

When creating a pytorch (1.0) tensor :

import torch
W = torch.tensor(([1.0]))

Pycharm (2018.3.1) gives me the following warning :

'tensor' is not callable less... (Ctrl+F1) 
Inspection info: This inspection highlights attempts to call objects which are not callable, like, for example, tuples

My code works fine (tensor() is callable) but I'd like to understand and get rid of this warning.

like image 523
u2gilles Avatar asked Dec 18 '18 04:12

u2gilles


1 Answers

This has been a known issue to them . The moderator replied with:

We will fix this in the next release. It’s being tracked at https://github.com/pytorch/pytorch/issues/7318

However, the reported issue was on PyTorch v0.4.1

like image 183
ndrwnaguib Avatar answered Nov 18 '22 21:11

ndrwnaguib