- Notifications
You must be signed in to change notification settings - Fork 19.7k
Open
Labels
Description
The RandomCrop layer does absolutely nothing during validation. This is due to the if condition placed here:
| if training: |
This looks pretty odd as the validation split will have different shape from the training data. The logic seemed to be it should do center crop for training=False as it is calculated here:
Example of training with 512x512 images but doing random crop to 256x512 confirms this as it raises this error as soon as the epoch finishes.
Input 0 of layer "convnext_small" is incompatible with the layer: expected shape=(None, 256, 512, 3), found shape=(None, 512, 512, 3) Arguments received by Functional.call(): • inputs=tf.Tensor(shape=(None, 512, 512, 3), dtype=float32) • training=False • mask=None • kwargs=<class 'inspect._empty'> Please confirm if this is an intended behaviour that you must place a center crop layer with the same crop size just after it to maintain the pipeline?