Skip to main content
edited tags
Link
Brian Spiering
  • 22.3k
  • 2
  • 28
  • 113
Format code
Source Link
Stephen Rauch
  • 1.8k
  • 11
  • 22
  • 34

I am trying to retrain inception final layer on new set of images.I I am using docker tensorflowTensorFlow image on windowsWindows environment.Below Below are the steps that iI am following.

1.Install docker toolbox for windows.

2.Pulling the tensorflow docker image.

docker run -it gcr.io/tensorflow/tensorflow:latest-devel

3.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.

4.cd /tensorflow

5.git pull

6.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

  1. Install docker toolbox for windows.

  2. Pulling the tensorflow docker image.

     docker run -it gcr.io/tensorflow/tensorflow:latest-devel
    
  3. 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.

  4. cd /tensorflow

  5. git pull

  6. 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 iI am getting an error which says-

tensorflow.python.framework.errors_impl.PermissionDeniedError: /tf_files/samples /AppData/Local/Application Data; Operation not permitted

tensorflow.python.framework.errors_impl.PermissionDeniedError: /tf_files/samples /AppData/Local/Application Data; Operation not permitted

belowBelow is the exact error that iI 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
"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_im
age_listscreate_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/error
s_implerrors_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

Till now i am not able to find any solution.Kindly help me to solve this issue.

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.

1.Install docker toolbox for windows.

2.Pulling the tensorflow docker image.

docker run -it gcr.io/tensorflow/tensorflow:latest-devel

3.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.

4.cd /tensorflow

5.git pull

6.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_im
age_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/error
s_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

Till now i am not able to find any solution.Kindly help me to solve this issue.

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.

  1. Install docker toolbox for windows.

  2. Pulling the tensorflow docker image.

     docker run -it gcr.io/tensorflow/tensorflow:latest-devel
    
  3. 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.

  4. cd /tensorflow

  5. git pull

  6. 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
Source Link

python.framework.errors_impl.permissiondeniederror

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.

1.Install docker toolbox for windows.

2.Pulling the tensorflow docker image.

docker run -it gcr.io/tensorflow/tensorflow:latest-devel

3.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.

4.cd /tensorflow

5.git pull

6.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_im
age_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/error
s_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

Till now i am not able to find any solution.Kindly help me to solve this issue.