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.
When I tried to run this:
Gives me the error: "expected type expression" on
nn.Module
(or other third-party classes such asnumpy.ndarray
) during building, whilenn.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.