We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc06fe4 commit dcdc91fCopy full SHA for dcdc91f
src/frontends/pytorch/src/op/slice.cpp
@@ -33,6 +33,9 @@ OutputVector translate_slice_common(const NodeContext& context,
33
dim = context.get_input(1);
34
if (dim.get_partial_shape().rank().is_dynamic() || dim.get_partial_shape().rank().get_length() == 0) {
35
dim = context.mark_node(std::make_shared<v1::Reshape>(dim, dims_1d_shape, false));
36
+ if (const auto axis_const = ov::util::get_constant_from_source(dim)) {
37
+ dim = axis_const;
38
+ }
39
}
40
start_idx = 2;
41
end_idx = 3;
0 commit comments