-
Notifications
You must be signed in to change notification settings - Fork 0
/
training scripts commands.txt
31 lines (25 loc) · 1.33 KB
/
training scripts commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Train Tensorflow model Google Cloud-------------------------------
<In the models/research directory>
protoc object_detection/protos/*.proto --python_out=.
export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
python setup.py sdist
(cd slim && python setup.py sdist)
gcloud ml-engine jobs submit training `whoami`_object_detection_resnet_`date +%m_%d_%Y_%H_%M_%S` \
--runtime-version 1.15 \
--job-dir=${YOUR_GCS_BUCKET}/train-resnet-lionfish \
--region us-east1 \
--packages dist/object_detection-0.1.tar.gz,slim/dist/slim-0.1.tar.gz,dist/absl-py-0.9.0.tar.gz,dist/pytools-2020.1.tar.gz,dist/pycocotools-2.0.0.tar.gz \
--module-name object_detection.model_main \
--config object_detection/samples/cloud/cloud3.yml \
-- \
--model_dir=${YOUR_GCS_BUCKET}/train-resnet-lionfish \
--train_dir=${YOUR_GCS_BUCKET}/train-resnet-lionfish \
--pipeline_config_path=${YOUR_GCS_BUCKET}/data-resnet-lionfish/pipeline.config
Tensorboard-------------------------------------------
tensorboard --logdir=${YOUR_GCS_BUCKET}/train-resnet-lionfish
Convert Tensorflow to frozen pb--------------------
python object_detection/export_inference_graph.py \
--input_type image_tensor \
--pipeline_config_path pipeline.config \
--trained_checkpoint_prefix model.ckpt-76678 \
--output_directory output_inference_graph.pb