Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible shapes: [4] vs. [3] [Op:GreaterEqual] #12

Open
ayviking opened this issue Apr 10, 2020 · 0 comments
Open

Incompatible shapes: [4] vs. [3] [Op:GreaterEqual] #12

ayviking opened this issue Apr 10, 2020 · 0 comments

Comments

@ayviking
Copy link

I tried all models but this error happened every time after some steps in the first epoch.

Traceback (most recent call last):
File "D:\Py\Basic_CNNs_TensorFlow2-master\Basic_CNNs_TensorFlow2-master\train.py", line 150, in
images, labels = process_features(features, data_augmentation=True)
File "D:\Py\Basic_CNNs_TensorFlow2-master\Basic_CNNs_TensorFlow2-master\train.py", line 94, in process_features
image_tensor = load_and_preprocess_image(image, data_augmentation=data_augmentation)
File "D:\Py\Basic_CNNs_TensorFlow2-master\Basic_CNNs_TensorFlow2-master\prepare_data.py", line 17, in load_and_preprocess_image
image = tf.image.random_crop(value=image, size=[IMAGE_HEIGHT, IMAGE_WIDTH, CHANNELS])
File "C:\Users\Viking\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_core\python\ops\random_ops.py", line 348, in random_crop
math_ops.reduce_all(shape >= size),
File "C:\Users\Viking\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_core\python\ops\gen_math_ops.py", line 4077, in greater_equal
_ops.raise_from_not_ok_status(e, name)
File "C:\Users\Viking\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_core\python\framework\ops.py", line 6606, in raise_from_not_ok_status
six.raise_from(core._status_to_exception(e.code, message), None)
File "", line 3, in raise_from
tensorflow.python.framework.errors_impl.InvalidArgumentError: Incompatible shapes: [4] vs. [3] [Op:GreaterEqual]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant