This repo is forked from Tensorflow-Project-Template. Based on their setting, I add the following features:
I use built-in Configuration rather than JSON file to record variables. For example, the exp_name could be used in constructing model_dir, save_path, model_name or anything. It is inconvenient and obvious to define these in the code. But, JSON file can not support this kind of reference.
Note that we could also use shell to achieve this.
I write a container for small dataset that can fit in memory. Simply, the dataset instance is built with X,y. Then, we can access its data directly or call next batch function.
Remember to add the dataset in data_loader.py.
I already built saver, global step and other repetitous ops used during training. Mostly, we need only define X and Y and overwrite build_model function
I did the things about sess and variables initialization. We only need to specific the training process, including logging and so on.
Train a demo mnist example.
python -m mains.train -it -c configs.example -m models.example -d datasets.mnist
Test
python -m mains.test -c configs.example -m models.example -d datasets.mnist
Args:
- -it: is training
- -c: config file
- -m: model file
- -d: data file
- Base config
- Base dataset
- Base model
- Base runner
- A toy example
- Doc
- Early Stopping Mechanism
- Large Dataset Loader