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
As disscussed in tensorflow/tensorflow#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).
The text was updated successfully, but these errors were encountered:
Thanks for the suggestion. When the size of the inputs is statically known before calling the layer, we can add such a check (like in your code example).
However, when the size is only known at runtime, it would not be practical to add ops to the graph to include this check. Instead, it should be up to the backend framework to raise an exception is the operation is invalid.
As disscussed in tensorflow/tensorflow#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).
The text was updated successfully, but these errors were encountered: