codon
codon copied to clipboard
"expected type expression" for third-party base class in inheritance
When I tried to run this:
from python import torch.nn as nn
class Network(nn.Module):
...
Gives me the error: "expected type expression" on nn.Module (or other third-party classes such as numpy.ndarray) during building, while nn.Module() can be called directly to initialize a module instance. Also, it doesn't give me an error when the base class is defined by myself.
Hi, did this error get resolved?