This repository contain codes to train an MNIST model using CNN and build the servable model files. TF serving can be used to serve the servable model files. The instructions are as follows :
- Run
main.py
with --train argument. Checkpoint files will be saved under a folder namedmodel_ckpt
. - Run
model_builder.py
. The servable model files will be saved under a folder namedserve
. - Pull the tensorflow/serving docker image with
docker pull tensorflow/serving
- Run the docker with
docker run -t --rm -p 8500:8500 \
-v "PATH_TO_SERVEFOLDER/mnistpb":/models/mnistpb \
-e MODEL_NAME=mnistpb \
tensorflow/serving &
- Run
client.py
file to get inference from the served model.
MIT