tensorflow 初測

#TAG=latest-py3
TAG=latest-gpu-py3

#準備資料
rm -rf $PWD/test
mkdir -p $PWD/test
cd $PWD/test
git clone https://github.com/purocean/tensorflow-simple-captcha.git
cd tensorflow-simple-captcha

#前處理
docker run \
  --runtime=nvidia \
  -it --rm \
  -v $PWD:/data \
  -w /data \
  tensorflow/tensorflow:$TAG python3 prepare.py

#訓練
time docker run \
  --runtime=nvidia \
  -it --rm \
  -v $PWD:/data \
  -w /data \
  tensorflow/tensorflow:$TAG python3 train.py

#測試
docker run \
  --runtime=nvidia \
  -it --rm \
  -v $PWD:/data \
  -w /data \
  tensorflow/tensorflow:$TAG bash -c 'python3 work.py < test.jpg'