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
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
source
TensorFlow version
tf 2.16
Custom code
Yes
OS platform and distribution
WIndows10 & Linux
Mobile device
No response
Python version
No response
Bazel version
No response
GCC/compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current behavior?
As disscussed in #64396, it should be considered as an abnormal input when kernel_size > input_size, while currently the Conv layers will silently generate an unexpected output, therefore maybe a checker is needed here.
The code to reproduce this issue:
from keras.layers import Conv2D
import numpy as np
x=np.random.rand(1,2,2,1)
l=Conv2D(1,3,(1,1),'valid','channels_last', [1,1],1, 'linear', True)
print(l(x).shape)
print(l.compute_output_shape(x.shape))
In my opinion, this code should not generate an output, a warning or error is expected since the kernel(3x3) is larger than input (2x2).
Standalone code to reproduce the issue
from keras.layers import Conv2D
import numpy as np
x=np.random.rand(1,2,2,1)
l=Conv2D(1,3,(1,1),'valid','channels_last', [1,1],1, 'linear', True)
print(l(x).shape)
print(l.compute_output_shape(x.shape))
Relevant log output
Currently in windows, the output is
(1, 2, 2, 1)
(1, 0, 0, 1)
And in Linux the output is
(1, 0, 0, 1)
(1, 0, 0, 1)
The inconsistant is discussed in tensorflow/tensorflow#64396. This issue is to report the need of checker for abnormal inputs of Conv layers.
The text was updated successfully, but these errors were encountered:
Issue type
Bug
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
source
TensorFlow version
tf 2.16
Custom code
Yes
OS platform and distribution
WIndows10 & Linux
Mobile device
No response
Python version
No response
Bazel version
No response
GCC/compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current behavior?
As disscussed in #64396, it should be considered as an abnormal input when kernel_size > input_size, while currently the Conv layers will silently generate an unexpected output, therefore maybe a checker is needed here.
The code to reproduce this issue:
In my opinion, this code should not generate an output, a warning or error is expected since the kernel(3x3) is larger than input (2x2).
Standalone code to reproduce the issue
Relevant log output
The text was updated successfully, but these errors were encountered: