xblaster/tensor-guess

Issue with guess.sh on OS X

franciskim opened this issue · 13 comments

Hi there @xblaster great work. I am getting the following error on OS X:

: Operation not supportednull

Any ideas?

Can I have a more complete stack trace or a context of usage ?

This is what I'm running:
./guess.sh /Users/franciskim/tensorflow/tensorflow_image_classifier/fk-classifier /tmp/foo.jpg

./guess.sh: 2: cd: can't cd to /tf_files
Traceback (most recent call last):
  File "label_image.py", line 1, in <module>
    import tensorflow as tf
  File "/tensorflow/tensorflow/__init__.py", line 23, in <module>
    from tensorflow.python import *
  File "/tensorflow/tensorflow/python/__init__.py", line 48, in <module>
    from tensorflow.python import pywrap_tensorflow
ImportError: cannot import name pywrap_tensorflow

I get that when I run it directly outside of the shell script.

Have you got the train data after the train.sh ? Do you have any error message during the train process ?

I believe training completed fine. What stands out is the first line of that error - can't cd to /tf_files

Just retrained. This happens at the end:

2017-03-09 15:48:47.828185: Step 3999: Validation accuracy = 100.0%
CRITICAL:tensorflow:Category has no images - testing.
Traceback (most recent call last):
  File "tensorflow/examples/image_retraining/retrain.py", line 824, in <module>
    tf.app.run()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 30, in run
    sys.exit(main(sys.argv))
  File "tensorflow/examples/image_retraining/retrain.py", line 807, in main
    bottleneck_tensor)
  File "tensorflow/examples/image_retraining/retrain.py", line 484, in get_random_cached_bottlenecks
    bottleneck_tensor)
  File "tensorflow/examples/image_retraining/retrain.py", line 392, in get_or_create_bottleneck
    bottleneck_dir, category)
  File "tensorflow/examples/image_retraining/retrain.py", line 281, in get_bottleneck_path
    category) + '.txt'
  File "tensorflow/examples/image_retraining/retrain.py", line 257, in get_image_path
    mod_index = index % len(category_list)
ZeroDivisionError: integer division or modulo by zero

What is the look of your train data folder ?

Can you provide a screenshot of the data folder ?

No response.

Experiencing the same issue.
Running this command is enough to reproduce it: ./guess.sh

My observation with ubuntu 17.04:
The script '/tensorflow/guess.sh' contains 'invalid' line endings (win?).
After I removed that '^M' the script runs well.
At the moment I have no clue to save my edit permanently.

Thanks for the observation. I'm pretty sure it's problem with windows endings. I'll fix that as soon I have time to do it.

Hi all. @xblaster great work, thx for the upload.
I'm experiencing the same problem. have you found a solution ?