A tensorflow2 implementation of some basic CNNs(MobileNetV1/V2/V3, EfficientNet, ResNeXt, InceptionV4, InceptionResNetV1/V2, SENet, SqueezeNet, DenseNet, ShuffleNetV2, ResNet).
526
stars
178
forks
source link
Incompatible shapes: [4] vs. [3] [Op:GreaterEqual] #12
Open
ayviking opened 4 years ago
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]