I am trying to retrain inception final layer on new set of images. I am using docker TensorFlow image on Windows environment. Below are the steps that I am following.
Install docker toolbox for windows.
Pulling the tensorflow docker image.
docker run -it gcr.io/tensorflow/tensorflow:latest-devel
Linking tensorflow to the folder on host machine where new set of images are stored.
docker run -it -v "$(pwd)":/tf_files/samples gcr.io/tensorflow/tensorflow:latest-devel
tf_files/samples contains the set of images on which I want to retrain the model.
cd /tensorflow
git pull
Then I am running the below script.
python tensorflow/examples/image_retraining/retrain.py \ --bottleneck_dir=/tf_files/bottlenecks \ --how_many_training_steps 500 \ --model_dir=/tf_files/inception \ --output_graph=/tf_files/retrained_graph.pb \ --output_labels=/tf_files/retrained_labels.txt \ --image_dir /tf_files/samples
Inception model is being downloaded properly but after that I am getting an error which says:
tensorflow.python.framework.errors_impl.PermissionDeniedError: /tf_files/samples /AppData/Local/Application Data; Operation not permitted
Below is the exact error that I am getting.
root@54808ee651a1:/tensorflow# python tensorflow/examples/image_retraining/retra
in.py \
> --bottleneck_dir=/tf_files/bottlenecks \
> --how_many_training_steps 500 \
> --model_dir=/tf_files/inception \
> --output_graph=/tf_files/retrained_graph.pb \
> --output_labels=/tf_files/retrained_labels.txt \
> --image_dir /tf_files/samples
Traceback (most recent call last):
File "tensorflow/examples/image_retraining/retrain.py", line 1326, in <module>
tf.app.run(main=main, argv=[sys.argv[0]] + unparsed)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "tensorflow/examples/image_retraining/retrain.py", line 988, in main
FLAGS.validation_percentage)
File "tensorflow/examples/image_retraining/retrain.py", line 144, in create_image_lists
sub_dirs = [x[0] for x in gfile.Walk(image_dir)]
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/lib/io/file_io.py", line 518, in walk
for subitem in walk(os.path.join(top, subdir), in_order):
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/lib/io/file_io.py", line 518, in walk
for subitem in walk(os.path.join(top, subdir), in_order):
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/lib/io/file_io.py", line 518, in walk
for subitem in walk(os.path.join(top, subdir), in_order):
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/lib/io/file_io.py", line 499, in walk
listing = list_directory(top)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/lib/io/file_io.py", line 478, in list_directory
compat.as_bytes(dirname), status)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/errors_impl.py", line 473, in __exit__
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.PermissionDeniedError: /tf_files/samples
/AppData/Local/Application Data; Operation not permitted