mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-29 23:06:41 +00:00
Fix error message when running NhwcConv with a bad weight channel count (#15221)
This commit is contained in:
parent
d182d34f1d
commit
b10aaf4e9c
1 changed files with 3 additions and 2 deletions
|
|
@ -113,11 +113,12 @@ struct ConvAttributes {
|
|||
|
||||
const int64_t M = weight_shape[0];
|
||||
const int64_t C = input_channels_last ? input_shape.GetDims().back() : input_shape[1];
|
||||
const int64_t weight_channels = weight_channels_last ? weight_shape.GetDims().back() : weight_shape[1];
|
||||
|
||||
if (C != (weight_channels_last ? weight_shape.GetDims().back() : weight_shape[1]) * group) {
|
||||
if (C != weight_channels * group) {
|
||||
return ORT_MAKE_STATUS(ONNXRUNTIME, FAIL, "Input channels C is not equal to kernel channels * group.",
|
||||
" C: ", C,
|
||||
" kernel channels: ", weight_shape[1],
|
||||
" kernel channels: ", weight_channels,
|
||||
" group: ", group);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue