Based on the fantastic lecture serie by AK here https://www.youtube.com/playlist?list=PLAqhIrjkxbuWI23v9cThsA9GvCAUhRvKZ
The code is slightly altered with
- I use
@dataclass
decorators, which don't play well withnn.Module
s out of the box, but I fix it - I add
DataSet
andDataLoader
classes, so I don't have too many global vars laying around - no GPU at all (device is cpu only): the mac I have at the moment has no GPU, which forces me to think carefully about optimizing intead of just scaling up the net
- my own comments, for personal reference
Structure is just like the one from AK
module.py
has all the module definitionstrain.py
has the data gathering, object instantiations and training loop