abdullahselek / plant-disease-classification-tf

Disease classification on different plants with using Machine Learning and Convolutional Neural Networks.
MIT License
60 stars 20 forks source link

y_pred_cls = tf.argmax(y_pred, dimension=1, axis=None) rise error of "Instructions for updating: Use the `axis` argument instead" #1

Open GokulSakthivel opened 5 years ago

GokulSakthivel commented 5 years ago

(tensorflow) gokul@gokul-HP-Notebook:~/Documents/Final Project/new/plant-disease-classification-master$ python3 plant_disease_classification/trainer.py Going to read training images Now going to read c_37 files (Index: 0) Now going to read c_36 files (Index: 1) Now going to read c_35 files (Index: 2) Now going to read c_34 files (Index: 3) Complete reading input data. Will Now print a snippet of it Number of files in Training-set: 2744 Number of files in Validation-set: 685 2019-03-13 22:05:42.473115: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 2019-03-13 22:05:42.500220: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2000165000 Hz 2019-03-13 22:05:42.500828: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x1bac7930 executing computations on platform Host. Devices: 2019-03-13 22:05:42.500893: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (0): , WARNING:tensorflow:From /home/gokul/Installed/tensorflow-master/tensorflow/lib/python3.5/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version. Instructions for updating: Colocations handled automatically by placer. WARNING:tensorflow:From plant_disease_classification/trainer.py:148: calling argmax (from tensorflow.python.ops.math_ops) with dimension is deprecated and will be removed in a future version. Instructions for updating: Use the axis argument instead ########################################################### even i try

y_pred_cls = tf.math.argmax( y_pred, axis=None, name=None, dimension=1 )

instance of

y_pred_cls = tf.argmax(y_pred, dimension=1, axis=None)

but got same error

jiawenbin2013 commented 5 years ago

I(venv) jiawenshandeMacBook-Pro:plant-disease-classification jiawenshan$ python plant_disease_classification/trainer.py --train plant_disease_classification/datasets/train --val plant_disease_classification/datasets/test --num_classes 1 Going to read training images Now going to read .DS_Store files (Index: 0) Now going to read Tomato_Bacterialspot files (Index: 1) Now going to read TomatoEarly_blight files (Index: 2) Complete reading input data. Will Now print a snippet of it Number of files in Training-set: 2002 Number of files in Validation-set: 500 WARNING:tensorflow:From /Users/jiawenshan/projects/web/python/venv/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version. Instructions for updating: Colocations handled automatically by placer.

I have the same problem,can you help me?

abdullahselek commented 5 years ago

Hey @GokulSakthivel @jiawenbin2013 I fixed the issues and updated requirements with versions. But I have an issue related to TensorFlow for classification. I have opened an issue and waiting for solution.