Tensorflow2 offers roughly 3 code styles of model implementation: Sequential, Functional and Subclassing. This project adopts each style to implement different image classifier architecture. Specifically, three files in models
package implements:
- feed forward architecture using Sequential API
- plain CNN architecture using functional API
- ResNet architecture using subclassing
This application is scripted and tested on M2 Apple Silicon machine.
conda env create
conda activate cifar10
User can try out this demo in two ways.
Each of three different pretrained models and corresponding CSV files of logs generated during training process are saved in my S3 repository. By executing main.py
script using remote
command, those objects can be downloaded, and you are ready to go.
python main.py remote
Optionally, to train and save models in local machine, execute main.py
script using local
command. Trained models and history files will be saved in directory specified in LOCAL_DIR
variable defined in main.py
.
python main.py local
To try out trained models, execute Streamlit demo as following.
streamlit run demo.py