Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions onnxruntime/core/providers/cpu/nn/conv_transpose_attributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,17 @@ struct ConvTransposeAttributes : public ConvAttributes {
" group: ", group);
}

// Bias shape validation (It should be a 1D tensor with size M)
Comment thread
hariharans29 marked this conversation as resolved.
// See https://github.com/microsoft/onnxruntime/issues/26144
if (B != nullptr) {
if (B->Shape().NumDimensions() != 1 || B->Shape()[0] != num_output_channels) {
return ORT_MAKE_STATUS(ONNXRUNTIME, INVALID_ARGUMENT,
"Bias shape is not compatible with number of output channels.",
Comment thread
hariharans29 marked this conversation as resolved.
Outdated
" Bias: ", B->Shape().ToString().c_str(),
Comment thread
hariharans29 marked this conversation as resolved.
Outdated
" num_output_channels: ", num_output_channels);
}
}
Comment thread
hariharans29 marked this conversation as resolved.
Comment thread
hariharans29 marked this conversation as resolved.

TensorShapeVector kernel_shape;
ORT_RETURN_IF_ERROR(ComputeKernelShape(F_Shape, kernel_shape, is_nhwc));

Expand Down
Loading