Skip to content

tk1012/keras-training-kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A template project for kaggle competitions based on keras

Run a docker image

Use vscode and open the root directory of this project. Then, you will see a popup to reopen in a dev container.

Create a virutal env in the dev container

poetry install
poetry shell

Download a kaggle competition dataset

mkdir kaggle_data
cd kaggle_data
kaggle competitions download -c <competition name>

Create your custom tfds dataset

mkdir datasets
cd datasets/
tfds new my_dataset  # Create `my_dataset/my_dataset.py` template files
# [...] Manually modify `my_dataset/my_dataset.py` to implement your dataset.
cd my_dataset/
tfds build  # Download and prepare the dataset to `~/tensorflow_datasets/`
# in your python code
import tensorflow_datasets as tfds
import datasets.my_dataset

ds = tfds.load("my_dataset")

Train a model

# modify ktk/apps/config/train.yaml
python -m ktk.apps.train

# or specify your own config
python -m ktk.apps.train --config_name=myconf

Evaluate a model

# modify ktk/apps/config/evaluate.yaml
python -m ktk.apps.evaluate

# or specify your own config
python -m ktk.apps.evaluate --config_name=myconf

Convert a saved model into a tflite mode and evaluate the converted model

python -m ktk.apps.tflite_converter
python -m ktk.apps.evaluate_tflite

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published