Description of the false positive
I get Call to a non-callable of class ... error alerts for PyTorch classes that inherit from the callable torch.nn.Module class:
- Class
torch.nn.CrossEntropyLoss
This class inherits from _WeightedLoss which inherits form _Loss which inherits from torch.nn.Module (see here for the source code).
- Class
torch.nn.ReflectionPad2d
This class inherits from _ReflectionPadNd which inherits from torch.nn.Module (see here for the source code).
torch.nn.Module defines the __call__ method as can be seen here.
URL to the alert on the project page on LGTM.com
CrossEntropyLoss errors: alert-1, alert-2
ReflectionPad2d error: alert