Unverified Commit 29c22b6c authored by Scott Cyphers's avatar Scott Cyphers Committed by GitHub

Don't use get_argument in ops. (#3726)

parent dd8c9ed7
......@@ -49,7 +49,7 @@ void op::Interpolate::validate_and_infer_types()
}
}
if (auto const_shape = dynamic_pointer_cast<op::Constant>(get_argument(1)))
if (auto const_shape = dynamic_pointer_cast<op::Constant>(input_value(1).get_node_shared_ptr()))
{
auto out_shape = static_cast<const int64_t*>(const_shape->get_data_ptr());
size_t i = 0;
......
......@@ -58,7 +58,7 @@ void op::PriorBox::validate_and_infer_types()
set_input_is_relevant_to_shape(0);
if (auto const_shape = dynamic_pointer_cast<op::Constant>(get_argument(0)))
if (auto const_shape = dynamic_pointer_cast<op::Constant>(input_value(0).get_node_shared_ptr()))
{
NODE_VALIDATION_CHECK(this,
shape_size(const_shape->get_shape()) == 2,
......
......@@ -72,7 +72,7 @@ void op::PriorBoxClustered::validate_and_infer_types()
set_input_is_relevant_to_shape(0);
if (auto const_shape = dynamic_pointer_cast<op::Constant>(get_argument(0)))
if (auto const_shape = dynamic_pointer_cast<op::Constant>(input_value(0).get_node_shared_ptr()))
{
NODE_VALIDATION_CHECK(this,
shape_size(const_shape->get_shape()) == 2,
......
......@@ -73,8 +73,8 @@ namespace ngraph
const CoordinateDiff& get_padding_below() const { return m_padding_below; }
const CoordinateDiff& get_padding_above() const { return m_padding_above; }
const Strides& get_data_dilation_strides() const { return m_data_dilation_strides; }
std::shared_ptr<Node> get_filters() { return get_argument(1); }
std::shared_ptr<Node> get_data_batch() { return get_argument(0); }
Output<Node> get_filters() { return input_value(1); }
Output<Node> get_data_batch() { return input_value(0); }
const ngraph::element::Type& get_output_type() const { return m_output_type; }
const ngraph::AxisSet& get_input_axes() const { return m_input_axes; }
const ngraph::AxisSet& get_filter_axes() const { return m_filter_axes; }
......
......@@ -56,8 +56,8 @@ namespace ngraph
const AxisSet& input1_axes = ngraph::AxisSet{},
const AxisSet& output_axes = ngraph::AxisSet{});
std::shared_ptr<Node> get_input0() { return get_argument(0); }
std::shared_ptr<Node> get_input1() { return get_argument(1); }
Output<Node> get_input0() { return input_value(0); }
Output<Node> get_input1() { return input_value(1); }
const ngraph::element::Type& get_output_type() const { return m_output_type; }
const ngraph::AxisSet& get_input0_axes() const { return m_input0_axes; }
const ngraph::AxisSet& get_input1_axes() const { return m_input1_axes; }
......
......@@ -42,13 +42,13 @@ op::util::ArithmeticReduction::ArithmeticReduction(const Output<Node>& arg,
bool op::util::ArithmeticReduction::reduction_axes_constant() const
{
return dynamic_pointer_cast<op::Constant>(get_argument(1)) != nullptr;
return dynamic_pointer_cast<op::Constant>(input_value(1).get_node_shared_ptr()) != nullptr;
}
const AxisSet op::util::ArithmeticReduction::get_reduction_axes() const
{
AxisSet axes;
if (auto const_op = dynamic_pointer_cast<op::Constant>(get_argument(1)))
if (auto const_op = dynamic_pointer_cast<op::Constant>(input_value(1).get_node_shared_ptr()))
{
axes = const_op->get_axis_set_val();
}
......
......@@ -30,7 +30,7 @@ op::util::LogicalReduction::LogicalReduction(const Output<Node>& arg, const Axis
element::i64, Shape{reduction_axes.size()}, reduction_axes.to_vector())
->output(0)})
{
add_provenance_group_member(input(1).get_source_output().get_node_shared_ptr());
add_provenance_group_member(input_value(1).get_node_shared_ptr());
}
op::util::LogicalReduction::LogicalReduction(const Output<Node>& arg,
......@@ -41,7 +41,7 @@ op::util::LogicalReduction::LogicalReduction(const Output<Node>& arg,
bool op::util::LogicalReduction::reduction_axes_constant() const
{
return dynamic_pointer_cast<op::Constant>(get_argument(1)) != nullptr;
return dynamic_pointer_cast<op::Constant>(input_value(1).get_node_shared_ptr()) != nullptr;
}
const AxisSet op::util::LogicalReduction::get_reduction_axes() const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment