I define a sub-class of PyTorch's Module in PyCharm and create an instance a:
from torch.nn import Module
class AModule(Module):
def __init__(self):
self.something = 10
def __repr__(self):
return "AModule"
a = AModule()
If I run the debugger and examine a, I can't see its attributes:
I checked and Module is written in Python (as opposed to being implemented in C), so why is that?

pdband examiningdir(a), which threw an error*** torch.nn.modules.module.ModuleAttributeError: 'AModule' object has no attribute '_parameters'. Various other questions I found by googling that error message seem to think that the way you're invokingModulecould be to blame - what does yourimportstatement look like, and can you edit that into your question?