dog-breeds-classification
dog-breeds-classification copied to clipboard
Python3 support?
First of all, thank you for the great code.
I think it doesn't support many modules .. I fixed the import issues and the reference files and I got to this thing:
python3 -m src.data_preparation.stanford_ds_to_tfrecords 2019-04-19 19:15:35.047663: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA WARNING:tensorflow:From /Users/User/Desktop/dog-breeds-classification/src/freezing/freeze.py:49: FastGFile.__init__ (from tensorflow.python.platform.gfile) is deprecated and will be removed in a future version. Instructions for updating: Use tf.gfile.GFile. 2019-04-19 19:15:35.731690: W tensorflow/core/framework/op_def_util.cc:355] Op BatchNormWithGlobalNormalization is deprecated. It will cease to work in GraphDef version 9. Use tf.nn.batch_normalization(). n02097658-silky_terrier n02097658_98 Traceback (most recent call last): File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/Users/User/Desktop/dog-breeds-classification/src/data_preparation/stanford_ds_to_tfrecords.py", line 73, in <module> image = parse_image(breed_dir, annotation_file) File "/Users/User/Desktop/dog-breeds-classification/src/data_preparation/stanford_ds_to_tfrecords.py", line 33, in parse_image img_raw = open(path, 'r').read() File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte Users-MBP-36:dog-breeds-classification User$
I think the whole library requires python2 to python3 conversion and for some reason python2 tensorflow doesn't work for me anymore (it will be deprecated next year) Is there any plans to convert the code to python3? Thanks.