Merge pull request #24751 from dkurt:d.kurtaev/hotfix_cuda_scale

[CUDA] Hotfix Scale with 1 parameter
pull/24755/head
Alexander Smorkalov 1 year ago committed by GitHub
commit f399bdfa1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      modules/dnn/src/cuda4dnn/primitives/scale_shift.hpp

@ -128,6 +128,9 @@ namespace cv { namespace dnn { namespace cuda4dnn {
/* the scale shift operation might require broadcasting */
const int end_axis = [&] {
if (num_parameters == 1) {
return static_cast<int>(axis + 1);
}
for (int endAxis = axis + 1; endAxis <= input.rank(); endAxis++) {
if (input.size_range(axis, endAxis) == mid_size)
return endAxis;

Loading…
Cancel
Save