Pytorch requires very specific ordering of __init__ and self assignment of module submodels:
https://github.com/pytorch/pytorch/blob/master/torch/nn/modules/module.py#L39
Lighting appears to break this expectation in ways that aren't documented and hard to understand, resulting in:
AttributeError: cannot assign module before Module.__init__() call
It's not clear why but based on the documentation, it seems like LightningModule should subclass from torch.nn.Module
LightningModule is subclass with one intermediate class...
```
class GradInformation(nn.Module):
...
class ModelIO(object):
...
class ModelHooks(torch.nn.Module):
...
class LightningModule(ABC, GradInformation, ModelIO, ModelHooks):
...
@jfelectron lightning does subclass from nn.Module... I think you forgot to call super().__init__() before doing anything in your class.

This error happened with me once and i had forgotten to call super().__init__()
Most helpful comment