19 #include "ngraph/axis_vector.hpp"
20 #include "ngraph/node.hpp"
21 #include "ngraph/op/op.hpp"
22 #include "ngraph/runtime/host_tensor.hpp"
68 class NGRAPH_DEPRECATED(
69 "This operation is deprecated and will be removed soon. "
70 "Use v1::Reshape instead of it.") NGRAPH_API Reshape :
public Op
72 NGRAPH_SUPPRESS_DEPRECATED_START
74 static constexpr NodeTypeInfo type_info{
"Reshape", 0};
75 const NodeTypeInfo& get_type_info()
const override {
return type_info; }
89 Reshape(
const Output<Node>& arg,
90 const AxisVector& input_order,
91 const Shape& output_shape);
93 void validate_and_infer_types()
override;
95 virtual std::shared_ptr<Node>
96 clone_with_new_inputs(
const OutputVector& new_args)
const override;
97 bool visit_attributes(AttributeVisitor& visitor)
override;
100 const AxisVector& get_input_order()
const {
return m_input_order; }
101 void set_input_order(
const AxisVector& input_order) { m_input_order = input_order; }
103 const Shape& get_reshape_output_shape()
const {
return m_output_shape; }
104 void set_output_shape(
const Shape& output_shape) { m_output_shape = output_shape; }
105 bool get_is_transpose()
const {
return m_is_transpose; }
106 void set_is_transpose(
bool is_transpose) { m_is_transpose = is_transpose; }
107 bool evaluate(
const HostTensorVector& outputs,
108 const HostTensorVector& inputs)
const override;
111 AxisVector m_input_order;
112 Shape m_output_shape;
113 bool m_is_transpose{
false};
114 NGRAPH_SUPPRESS_DEPRECATED_END
128 NGRAPH_RTTI_DECLARATION;
143 Reshape(
const Output<Node>& arg,
const Output<Node>& pattern,
bool special_zero);
149 virtual std::shared_ptr<Node>
150 clone_with_new_inputs(
const OutputVector& new_args)
const override;
152 bool get_special_zero()
const {
return m_special_zero; }
153 void set_special_zero(
bool special_zero) { m_special_zero = special_zero; }
154 bool evaluate(
const HostTensorVector& outputs,
155 const HostTensorVector& inputs)
const override;
161 NGRAPH_SUPPRESS_DEPRECATED_START
163 NGRAPH_SUPPRESS_DEPRECATED_END