sanjayk9
395a67b1b7
dnn: fix Pow with an integer base and a float exponent ( #31280 )
...
* dnn: fix Pow with an integer base and a float exponent
The output keeps the base type, and the exponent was converted to it before
the power was computed, so x^0.5 became x^0. Compute in double and truncate
toward zero, as onnxruntime does.
Florence-2's vision encoder computes sqrt(num_patches) this way to build a
Reshape shape, which made the Reshape fail.
* dnn: call std::pow for Pow with an integer base and a float exponent
A single exponent went through cv::pow, whose exp(y*log(x)) can land one
ulp below an exact integer (4^1.5 = 7.99..), and truncation then gave
7 instead of 8. Compute each element with std::pow, as onnxruntime does.
The new test uses a constant scalar exponent, as Florence-2 does.
2026-12-02 19:36:00 +05:30
..
2026-11-29 00:00:25 +01:00
2026-11-24 13:36:58 +05:30
2026-11-29 00:00:25 +01:00
2026-12-02 19:36:00 +05:30
2026-10-22 11:06:53 +03:00
2026-12-02 14:53:31 +05:30
2026-11-15 12:50:26 +05:30
2026-11-29 00:00:25 +01:00
2026-09-23 16:20:33 +03:00
2026-11-29 00:00:25 +01:00
2021-11-23 21:15:31 +00:00
2026-09-16 11:56:51 +03:00
2026-12-01 17:06:51 +05:30
2022-10-07 16:57:31 +00:00
2022-10-07 16:57:31 +00:00
2022-01-18 01:22:22 +03:00
2025-09-15 15:03:34 +03:00
2023-09-10 13:11:36 +00:00
2026-10-22 11:06:53 +03:00
2026-11-30 17:13:36 +05:30
2026-11-30 17:13:36 +05:30
2022-03-19 06:54:07 +00:00
2022-10-07 16:57:31 +00:00
2026-10-29 08:41:09 +03:00
2026-07-29 20:32:42 +05:30
2026-07-29 20:19:40 +05:30
2026-09-29 08:39:46 +03:00
2026-11-24 13:38:53 +05:30
2026-12-01 17:06:51 +05:30
2026-12-01 17:06:51 +05:30
2026-12-01 17:06:51 +05:30
2026-12-01 17:06:51 +05:30
2026-10-26 18:52:12 +03:00
2026-12-01 17:06:51 +05:30
2026-12-01 17:06:51 +05:30
2026-07-29 20:19:40 +05:30
2026-10-28 21:28:47 +03:00
2026-04-14 09:15:46 +03:00
2023-11-08 16:26:33 +03:00
2026-10-29 08:41:09 +03:00
2025-10-04 13:22:30 +03:00
2024-05-15 11:51:59 +03:00
2026-12-02 11:50:49 +05:30
2026-10-01 18:03:55 +03:00
2026-08-21 17:17:50 +03:00
2026-07-29 20:19:40 +05:30
2026-10-19 13:06:41 +03:00
2026-10-19 13:06:41 +03:00
2024-06-06 12:52:06 +03:00
2026-05-22 19:56:51 +03:00
2026-10-14 14:54:51 +05:30
2026-10-14 14:54:51 +05:30
2026-10-14 14:54:51 +05:30
2026-10-14 14:54:51 +05:30
2026-10-14 14:54:51 +05:30
2021-08-12 20:33:31 +08:00
2026-11-03 10:29:32 +03:00
2023-07-27 14:21:30 +03:00
2026-11-03 10:29:32 +03:00
2026-12-02 16:24:59 +05:30
2026-03-26 15:07:56 +03:00
2026-11-03 10:29:32 +03:00
2026-12-01 17:06:51 +05:30
2025-06-10 10:16:50 +03:00
2026-11-03 10:29:32 +03:00
2026-11-29 00:00:25 +01:00
2026-11-27 00:10:29 +05:30
2026-03-03 14:29:47 +03:00
2023-07-27 14:21:30 +03:00
2026-11-03 10:29:32 +03:00
2026-11-03 10:29:32 +03:00
2026-03-19 11:29:57 +03:00
2026-09-24 11:02:15 +02:00
2026-03-03 14:29:47 +03:00
2026-03-03 14:29:47 +03:00
2026-01-06 22:57:02 +08:00
2023-05-18 20:02:27 +03:00
2022-03-08 19:22:46 +00:00
2024-03-18 15:05:50 +04:00
2022-10-07 16:57:31 +00:00
2022-10-07 16:57:31 +00:00
2024-10-30 18:37:22 +03:00
2024-07-17 10:08:16 +03:00