File tree 1 file changed +4
-4
lines changed
src/frontends/pytorch/src/op
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 5
5
#include < cmath>
6
6
7
7
#include " openvino/frontend/pytorch/node_context.hpp"
8
- #include " openvino/op/multiply.hpp"
9
8
#include " openvino/op/constant.hpp"
9
+ #include " openvino/op/multiply.hpp"
10
10
11
11
namespace ov {
12
12
namespace frontend {
@@ -16,18 +16,18 @@ namespace op {
16
16
OutputVector translate_rad2deg (const NodeContext& context) {
17
17
// Ensure that the operation has exactly one input (the input tensor)
18
18
num_inputs_check (context, 1 , 1 );
19
-
19
+
20
20
// Retrieve the input tensor
21
21
auto input = context.get_input (0 );
22
22
23
23
// Get the input element type dynamically
24
24
auto input_type = input.get_element_type ();
25
25
26
26
const double pi_val = std::atan (1.0 ) * 4 ;
27
-
27
+
28
28
// Create a constant node with the conversion factor (180 / π)
29
29
auto conversion_factor = context.mark_node (ov::op::v0::Constant::create (input_type, Shape{}, {180.0 / pi_val}));
30
-
30
+
31
31
// Apply the multiplication operation to convert radians to degrees
32
32
auto result = context.mark_node (std::make_shared<ov::op::v1::Multiply>(input, conversion_factor));
33
33
You can’t perform that action at this time.
0 commit comments