dir gives error
from dataclasses import dataclass

@dataclass
class Net(nn.Module):
  pass  

x = Net()

dir(x)

gives error
AttributeError: 'Net' object has no attribute '_parameters'
if I remove @dataclass, then it lists attributes.