codon icon indicating copy to clipboard operation
codon copied to clipboard

"expected type expression" for third-party base class in inheritance

Open sdflkjssl opened this issue 2 years ago • 1 comments

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.

sdflkjssl avatar Aug 30 '23 18:08 sdflkjssl

Hi, did this error get resolved?

tersiteab avatar Oct 03 '23 16:10 tersiteab