Eryk Halicki Devlog Art

Building the model and collecting data

Zima · 2025-11-08 · 2 hours

Goal: Start building pytorch action model and training pipeline. Collect dataset

What I did:
- Collected 10 minutes of demonstrations (~70 demonstrations)
- Created the ActionResNet model (resnet18 as features extractor + 2 layer action head)
- Started writing dataset loading code + training loop
- learned more about pytorch

What worked:
- data collection pipeline works great
- using pretrained resnet weights is pretty intuitive
- creating action head is dead easy
- feeling more comfortable with pytorch syntax
- creating dataloader looking easy, should combine with the hdf5 class in sim folder

What failed:
- Very tired
- Not sure if this folder structure makes the most sense
- need to reorganize folders, maybe make a single folder for imitation learning instead of seperate ml and sim folders

Key learning:
- tanh saturates at extremes, not good to use if data is close to extremes often
- model.train and model.eval does NOT automatically set param.requires_grad = False, it just changes behaviour of dropout and batch normalization
- nn.Module.add_module can be used to make stuff accessible using model.children and model.apply
- dont use L2 norm on output, then we just end up with only direction! (makes sense since we would only outut unit vectors, but just something to keep in mind)

Next session:
- create torch dataloader / dataset for image action pairs (combine with hdf5 code?)
- test model output / forward run works correctly
- write training loop
- train and visualize validation loss to see if model is converging
- create controller that

Time spent: 2 hours