You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the following shape error when I am trying to run the CNN Classifier code. However I have tried all means of resolving it, but I wasn't able to resolve it at all. I have few images that I am trying to classify. I am using image size as 32. I have tried with different image sizes on my custom dataset, however I face similar issue everytime.
Please see the below stack trace of the error. I would be very grateful if you could please help me out with it.
INFO:root:Loading resource: Images [C:\Users\hits\cnn_classifier\Output\images\t
rain]
img_size 3072
length of data 32
WARNING:tensorflow:From C:\Users\hits\cnn_classifier\cnn_model.py:171: softmax_c
ross_entropy_with_logits (from tensorflow.python.ops.nn_ops) is deprecated and w
ill be removed in a future version.
Instructions for updating:
Future major versions of TensorFlow will allow gradients to flow
into the labels input on backprop by default.
See @{tf.nn.softmax_cross_entropy_with_logits_v2}.
WARNING:tensorflow:From C:\Users\hits\cnn_classifier\cnn_model.py:171: softmax_c
ross_entropy_with_logits (from tensorflow.python.ops.nn_ops) is deprecated and w
ill be removed in a future version.
Instructions for updating:
Future major versions of TensorFlow will allow gradients to flow
into the labels input on backprop by default.
See @{tf.nn.softmax_cross_entropy_with_logits_v2}.
WARNING:tensorflow:From C:\Users\hits\cnn_classifier\cnn_model.py:189: calling a
rgmax (from tensorflow.python.ops.math_ops) with dimension is deprecated and wil
l be removed in a future version.
Instructions for updating:
Use the axis argument instead
WARNING:tensorflow:From C:\Users\hits\cnn_classifier\cnn_model.py:189: calling a
rgmax (from tensorflow.python.ops.math_ops) with dimension is deprecated and wil
l be removed in a future version.
Instructions for updating:
Use the axis argument instead
2018-07-20 16:08:52.728842: I T:\src\github\tensorflow\tensorflow\core\platform
cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow bi
nary was not compiled to use: AVX2
WARNING:root:Resource not found: CNN Model [C:\Users\hits\cnn_classifier\Output
tmp\tensorflow/cnn/model\model.ckpt]. Model will now be trained from scratch.
Tensor("cost/Mean:0", shape=(), dtype=float32) {<tf.Tensor 'input/x-input:0' sha
pe=(1, 3072) dtype=float32>: 1, <tf.Tensor 'input/y_true:0' shape=(1, 2) dtype=f
loat32>: 1, <tf.Tensor 'input/Placeholder:0' shape= dtype=float32>: 1.0
}
Traceback (most recent call last):
File "main.py", line 47, in
train(image_directory, model_directory)
File "C:\Users\hits\cnn_classifier\cnn_model.py", line 264, in train
checkpoint_path=os.path.join(checkpoint_dir, 'model.ckpt'))
File "C:\Users\hits\cnn_classifier\cnn_model.py", line 79, in log_progress
val_loss = session.run(cost, feed_dict=test_feed_dict)
File "C:\Users\hits\Anaconda3\lib\site-packages\tensorflow\python\client\sessi
on.py", line 900, in run
run_metadata_ptr)
File "C:\Users\hits\Anaconda3\lib\site-packages\tensorflow\python\client\sessi
on.py", line 1111, in _run
str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape () for Tensor 'input/x-input:0', which ha
s shape '(1, 3072)'
Hello Joel Lutman,@jhole89
I get the following shape error when I am trying to run the CNN Classifier code. However I have tried all means of resolving it, but I wasn't able to resolve it at all. I have few images that I am trying to classify. I am using image size as 32. I have tried with different image sizes on my custom dataset, however I face similar issue everytime.
Please see the below stack trace of the error. I would be very grateful if you could please help me out with it.
INFO:root:Loading resource: Images [C:\Users\hits\cnn_classifier\Output\images\t
rain]
img_size 3072
length of data 32
WARNING:tensorflow:From C:\Users\hits\cnn_classifier\cnn_model.py:171: softmax_c
ross_entropy_with_logits (from tensorflow.python.ops.nn_ops) is deprecated and w
ill be removed in a future version.
Instructions for updating:
Future major versions of TensorFlow will allow gradients to flow
into the labels input on backprop by default.
See @{tf.nn.softmax_cross_entropy_with_logits_v2}.
WARNING:tensorflow:From C:\Users\hits\cnn_classifier\cnn_model.py:171: softmax_c
ross_entropy_with_logits (from tensorflow.python.ops.nn_ops) is deprecated and w
ill be removed in a future version.
Instructions for updating:
Future major versions of TensorFlow will allow gradients to flow
into the labels input on backprop by default.
See @{tf.nn.softmax_cross_entropy_with_logits_v2}.
WARNING:tensorflow:From C:\Users\hits\cnn_classifier\cnn_model.py:189: calling a
rgmax (from tensorflow.python.ops.math_ops) with dimension is deprecated and wil
l be removed in a future version.
Instructions for updating:
Use the
axis
argument insteadWARNING:tensorflow:From C:\Users\hits\cnn_classifier\cnn_model.py:189: calling a
rgmax (from tensorflow.python.ops.math_ops) with dimension is deprecated and wil
l be removed in a future version.
Instructions for updating:
Use the
axis
argument instead2018-07-20 16:08:52.728842: I T:\src\github\tensorflow\tensorflow\core\platform
cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow bi
nary was not compiled to use: AVX2
WARNING:root:Resource not found: CNN Model [C:\Users\hits\cnn_classifier\Output
tmp\tensorflow/cnn/model\model.ckpt]. Model will now be trained from scratch.
Tensor("cost/Mean:0", shape=(), dtype=float32) {<tf.Tensor 'input/x-input:0' sha
pe=(1, 3072) dtype=float32>: 1, <tf.Tensor 'input/y_true:0' shape=(1, 2) dtype=f
loat32>: 1, <tf.Tensor 'input/Placeholder:0' shape= dtype=float32>: 1.0
}
Traceback (most recent call last):
File "main.py", line 47, in
train(image_directory, model_directory)
File "C:\Users\hits\cnn_classifier\cnn_model.py", line 264, in train
checkpoint_path=os.path.join(checkpoint_dir, 'model.ckpt'))
File "C:\Users\hits\cnn_classifier\cnn_model.py", line 79, in log_progress
val_loss = session.run(cost, feed_dict=test_feed_dict)
File "C:\Users\hits\Anaconda3\lib\site-packages\tensorflow\python\client\sessi
on.py", line 900, in run
run_metadata_ptr)
File "C:\Users\hits\Anaconda3\lib\site-packages\tensorflow\python\client\sessi
on.py", line 1111, in _run
str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape () for Tensor 'input/x-input:0', which ha
s shape '(1, 3072)'
@jhole89
The text was updated successfully, but these errors were encountered: