Computer Vision ๐ผ๏ธ
In this section, we will introduce:
- How to define a new model & How to use it for training.
- How to customize transforms (i.e. customize data augmentations).
Customize Models
Basically, there are no differences between defining our own Computer Vision models and defining an nn.Module, so the information provided in the Customize Models in General section is pretty enough.
However, to make things even easier, carefree-learn provides register_module API, which can directly register an nn.Module to a ModelProtocol:
In this case, we assume that this model receive one tensor as input, and output one tensor. Then, carefree-learn will internally convert the batches to input tensors and convert the output tensors to tensor dictionaries.
note
Notice that the original nn.Module will be constructed as ModelProtocol.core.
Customize Transforms
caution
To be continued...