Skip to content

Instantly share code, notes, and snippets.

@haoxi911
Created August 15, 2018 04:54
Show Gist options
  • Save haoxi911/4adb46dbc11b55d52ece22f19caa2c5d to your computer and use it in GitHub Desktop.
Save haoxi911/4adb46dbc11b55d52ece22f19caa2c5d to your computer and use it in GitHub Desktop.
20180815
58266 dog
58432 not_dog
python retrain_lsvrc_dataset.py \
--tfhub_module=https://tfhub.dev/google/imagenet/mobilenet_v1_100_224/feature_vector/1 \
--image_dir=/home/ubuntu/datasets/pps_imagenet/output_dnd \
--output_graph=/home/ubuntu/datasets/pps_output/output_graph.pb \
--output_labels=/home/ubuntu/datasets/pps_output/output_labels.txt \
--adam_optimizer_epsilon=0.1 \
--how_many_training_steps=36500 \
--learning_rate_decay_steps=3650
bazel run --config=opt \
//tensorflow/contrib/lite/toco:toco -- \
--input_file=/home/ubuntu/datasets/pps_output/output_graph.pb \
--output_file=/home/ubuntu/datasets/pps_output/output_graph.tflite \
--inference_type=FLOAT \
--input_shape=1,224,224,3 \
--input_array=Placeholder \
--output_array=final_result \
--input_format=TENSORFLOW_GRAPHDEF \
--output_format=TFLITE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment