mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-06 00:03:22 +00:00
Fix 2D detection bug (#21128)
### Description Should compare two leading dims for 1.f ### Motivation and Context Vulnerability scanner
This commit is contained in:
parent
ac21626725
commit
b95982e588
1 changed files with 1 additions and 1 deletions
|
|
@ -230,7 +230,7 @@ Status Upsample<T>::BaseCompute(OpKernelContext* context,
|
|||
}
|
||||
|
||||
const bool is_2D = X_dims.size() == 2;
|
||||
const bool is_nchw = is_2D ? true : (scales[1] == 1.0f && scales[1] == 1.0f);
|
||||
const bool is_nchw = is_2D ? true : (scales[0] == 1.0f && scales[1] == 1.0f);
|
||||
|
||||
ORT_RETURN_IF_NOT(is_nchw,
|
||||
"Resize 'Cubic' mode only supports NCWH layout "
|
||||
|
|
|
|||
Loading…
Reference in a new issue