I am using pytorch
and pylint
does not recognize few functions for ex: torch.stack
however, if I do import torch._C as torch
it seems to work fine.
If I do above, actual modules that exist inside torch
package like torch.cuda
or torch.nn
need to imported individually as simply doing torch.cuda
would point to torch._C.cuda
and hence won't work.
Is there a way to tell pylint
to look at both torch
and torch._C
when I do import torch
or even whenever it sees torch? I don't think I would use torch
to reference any other thing in my code.