keras-team/keras · error · ValueError
The convolution operation resulted in an empty output. This
Error message
The convolution operation resulted in an empty output. This can happen if the input is too small for the given kernel size, strides, dilation rate, and padding mode. Please check the input shape and convolution parameters.
What it means
Error "The convolution operation resulted in an empty output. This can happen if the input is too small for the given kernel size, strides, dilation rate, and padding mode. Please check the input shape and convolution parameters." thrown in keras-team/keras.
Source
Thrown at keras/src/backend/numpy/ops/nn.py:677
raise ValueError(
"The number of input channels must be evenly divisible by "
f"kernel's in_channels. Received input channels {channels} and "
f"kernel in_channels {kernel_in_channels}. "
)
feature_group_count = channels // kernel_in_channels
result = np.array(
jax.lax.conv_general_dilated(
inputs,
kernel if is_tensor(kernel) else kernel.numpy(),
strides,
padding,
rhs_dilation=dilation_rate,
dimension_numbers=dimension_numbers,
feature_group_count=feature_group_count,
)
)
if result.size == 0 and inputs.size != 0:
raise ValueError(
"The convolution operation resulted in an empty output. "
"This can happen if the input is too small for the given "
"kernel size, strides, dilation rate, and padding mode. "
"Please check the input shape and convolution parameters."
)
return result
def depthwise_conv(
inputs,
kernel,
strides=1,
padding="valid",
data_format=None,
dilation_rate=1,
):
data_format = standardize_data_format(data_format)
inputs = convert_to_tensor(inputs)View on GitHub (pinned to 7a34a03db6)
When it happens
Trigger: Thrown at keras/src/backend/numpy/ops/nn.py:677 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of keras-team/keras@7a34a03db6 (2026-08-25).
Data as JSON: /api/errors/67a57cb3eedf324b.
Report an issue: GitHub.