Unverified Commit a1f3202c authored by Scott Cyphers's avatar Scott Cyphers Committed by GitHub

Convert missed ops to accept Output<Node> (#3539)

parent d8fbe52b
......@@ -21,10 +21,10 @@ using namespace ngraph;
const string op::CTCGreedyDecoder::type_name{"CTCGreedyDecoder"};
op::CTCGreedyDecoder::CTCGreedyDecoder(const shared_ptr<Node>& input,
const std::shared_ptr<Node>& seq_len,
op::CTCGreedyDecoder::CTCGreedyDecoder(const Output<Node>& input,
const Output<Node>& seq_len,
const bool ctc_merge_repeated)
: Op(check_single_output_args({input, seq_len}))
: Op({input, seq_len})
, m_ctc_merge_repeated(ctc_merge_repeated)
{
constructor_validate_and_infer_types();
......
......@@ -33,8 +33,8 @@ namespace ngraph
/// \param input Logits on which greedy decoding is performed
/// \param seq_len Sequence lengths
/// \param ctc_merge_repeated Whether to merge repeated labels
CTCGreedyDecoder(const std::shared_ptr<Node>& input,
const std::shared_ptr<Node>& seq_len,
CTCGreedyDecoder(const Output<Node>& input,
const Output<Node>& seq_len,
const bool ctc_merge_repeated);
void validate_and_infer_types() override;
......
......@@ -21,14 +21,13 @@ using namespace ngraph;
const string op::DetectionOutput::type_name{"DetectionOutput"};
op::DetectionOutput::DetectionOutput(const std::shared_ptr<Node>& box_logits,
const std::shared_ptr<Node>& class_preds,
const std::shared_ptr<Node>& proposals,
const std::shared_ptr<Node>& aux_class_preds,
const std::shared_ptr<Node>& aux_box_preds,
op::DetectionOutput::DetectionOutput(const Output<Node>& box_logits,
const Output<Node>& class_preds,
const Output<Node>& proposals,
const Output<Node>& aux_class_preds,
const Output<Node>& aux_box_preds,
const DetectionOutputAttrs& attrs)
: Op(check_single_output_args(
{box_logits, class_preds, proposals, aux_class_preds, aux_box_preds}))
: Op({box_logits, class_preds, proposals, aux_class_preds, aux_box_preds})
, m_attrs(attrs)
{
constructor_validate_and_infer_types();
......
......@@ -58,11 +58,11 @@ namespace ngraph
/// \param aux_class_preds Auxilary class predictions
/// \param aux_box_preds Auxilary box predictions
/// \param attrs Detection Output attributes
DetectionOutput(const std::shared_ptr<Node>& box_logits,
const std::shared_ptr<Node>& class_preds,
const std::shared_ptr<Node>& proposals,
const std::shared_ptr<Node>& aux_class_preds,
const std::shared_ptr<Node>& aux_box_preds,
DetectionOutput(const Output<Node>& box_logits,
const Output<Node>& class_preds,
const Output<Node>& proposals,
const Output<Node>& aux_class_preds,
const Output<Node>& aux_box_preds,
const DetectionOutputAttrs& attrs);
void validate_and_infer_types() override;
......
......@@ -23,10 +23,10 @@ using namespace ngraph;
const string op::Interpolate::type_name{"Interpolate"};
op::Interpolate::Interpolate(const std::shared_ptr<Node>& image,
const std::shared_ptr<Node>& output_shape,
op::Interpolate::Interpolate(const Output<Node>& image,
const Output<Node>& output_shape,
const InterpolateAttrs& attrs)
: Op(check_single_output_args({image, output_shape}))
: Op({image, output_shape})
, m_attrs(attrs)
{
constructor_validate_and_infer_types();
......
......@@ -44,8 +44,8 @@ namespace ngraph
/// \param image Input image
/// \param output_shape Output shape of spatial axes
/// \param attrs Interpolation attributes
Interpolate(const std::shared_ptr<Node>& image,
const std::shared_ptr<Node>& output_shape,
Interpolate(const Output<Node>& image,
const Output<Node>& output_shape,
const InterpolateAttrs& attrs);
void validate_and_infer_types() override;
......
......@@ -23,10 +23,10 @@ using namespace ngraph;
const string op::PriorBox::type_name{"PriorBox"};
op::PriorBox::PriorBox(const shared_ptr<Node>& layer_shape,
const shared_ptr<Node>& image_shape,
op::PriorBox::PriorBox(const Output<Node>& layer_shape,
const Output<Node>& image_shape,
const PriorBoxAttrs& attrs)
: Op(check_single_output_args({layer_shape, image_shape}))
: Op({layer_shape, image_shape})
, m_attrs(attrs)
{
constructor_validate_and_infer_types();
......
......@@ -57,8 +57,8 @@ namespace ngraph
/// \param layer_shape Shape of layer for which prior boxes are computed
/// \param image_shape Shape of image to which prior boxes are scaled
/// \param attrs PriorBox attributes
PriorBox(const std::shared_ptr<Node>& layer_shape,
const std::shared_ptr<Node>& image_shape,
PriorBox(const Output<Node>& layer_shape,
const Output<Node>& image_shape,
const PriorBoxAttrs& attrs);
void validate_and_infer_types() override;
......
......@@ -23,10 +23,10 @@ using namespace ngraph;
const string op::PriorBoxClustered::type_name{"PriorBoxClustered"};
op::PriorBoxClustered::PriorBoxClustered(const shared_ptr<Node>& layer_shape,
const shared_ptr<Node>& image_shape,
op::PriorBoxClustered::PriorBoxClustered(const Output<Node>& layer_shape,
const Output<Node>& image_shape,
const PriorBoxClusteredAttrs& attrs)
: Op(check_single_output_args({layer_shape, image_shape}))
: Op({layer_shape, image_shape})
, m_attrs(attrs)
{
constructor_validate_and_infer_types();
......
......@@ -55,8 +55,8 @@ namespace ngraph
/// \param layer_shape Shape of layer for which prior boxes are computed
/// \param image_shape Shape of image to which prior boxes are scaled
/// \param attrs PriorBoxClustered attributes
PriorBoxClustered(const std::shared_ptr<Node>& layer_shape,
const std::shared_ptr<Node>& image_shape,
PriorBoxClustered(const Output<Node>& layer_shape,
const Output<Node>& image_shape,
const PriorBoxClusteredAttrs& attrs);
void validate_and_infer_types() override;
......
......@@ -23,11 +23,11 @@ using namespace ngraph;
const string op::Proposal::type_name{"Proposal"};
op::Proposal::Proposal(const std::shared_ptr<Node>& class_probs,
const std::shared_ptr<Node>& class_logits,
const std::shared_ptr<Node>& image_shape,
op::Proposal::Proposal(const Output<Node>& class_probs,
const Output<Node>& class_logits,
const Output<Node>& image_shape,
const ProposalAttrs& attrs)
: Op(check_single_output_args({class_probs, class_logits, image_shape}))
: Op({class_probs, class_logits, image_shape})
, m_attrs(attrs)
{
constructor_validate_and_infer_types();
......
......@@ -66,9 +66,9 @@ namespace ngraph
/// \param class_logits Class prediction logits
/// \param image_shape Shape of image
/// \param attrs Proposal op attributes
Proposal(const std::shared_ptr<Node>& class_probs,
const std::shared_ptr<Node>& class_logits,
const std::shared_ptr<Node>& image_shape,
Proposal(const Output<Node>& class_probs,
const Output<Node>& class_logits,
const Output<Node>& image_shape,
const ProposalAttrs& attrs);
void validate_and_infer_types() override;
......
......@@ -21,15 +21,15 @@ using namespace ngraph;
const string op::PSROIPooling::type_name{"PSROIPooling"};
op::PSROIPooling::PSROIPooling(const shared_ptr<Node>& input,
const shared_ptr<Node>& coords,
op::PSROIPooling::PSROIPooling(const Output<Node>& input,
const Output<Node>& coords,
const size_t output_dim,
const size_t group_size,
const float spatial_scale,
int spatial_bins_x,
int spatial_bins_y,
const string& mode)
: Op(check_single_output_args({input, coords}))
: Op({input, coords})
, m_output_dim(output_dim)
, m_group_size(group_size)
, m_spatial_scale(spatial_scale)
......
......@@ -38,8 +38,8 @@ namespace ngraph
/// \param spatial_bins_x Numbers of bins to divide the input feature maps over width
/// \param spatial_bins_y Numbers of bins to divide the input feature maps over height
/// \param mode Mode of pooling - Avg or Bilinear
PSROIPooling(const std::shared_ptr<Node>& input,
const std::shared_ptr<Node>& coords,
PSROIPooling(const Output<Node>& input,
const Output<Node>& coords,
const size_t output_dim,
const size_t group_size,
const float spatial_scale,
......
......@@ -21,7 +21,7 @@ using namespace ngraph;
const string op::RegionYolo::type_name{"RegionYolo"};
op::RegionYolo::RegionYolo(const shared_ptr<Node>& input,
op::RegionYolo::RegionYolo(const Output<Node>& input,
const size_t num_coords,
const size_t num_classes,
const size_t num_regions,
......@@ -29,7 +29,7 @@ op::RegionYolo::RegionYolo(const shared_ptr<Node>& input,
const vector<int64_t>& mask,
const int axis,
const int end_axis)
: Op(check_single_output_args({input}))
: Op({input})
, m_num_coords(num_coords)
, m_num_classes(num_classes)
, m_num_regions(num_regions)
......
......@@ -38,7 +38,7 @@ namespace ngraph
/// \param mask Mask
/// \param axis Axis to begin softmax on
/// \param end_axis Axis to end softmax on
RegionYolo(const std::shared_ptr<Node>& input,
RegionYolo(const Output<Node>& input,
const size_t num_coords,
const size_t num_classes,
const size_t num_regions,
......
......@@ -21,8 +21,8 @@ using namespace ngraph;
const string op::ReorgYolo::type_name{"ReorgYolo"};
op::ReorgYolo::ReorgYolo(const shared_ptr<Node>& input, const Strides& strides)
: Op(check_single_output_args({input}))
op::ReorgYolo::ReorgYolo(const Output<Node>& input, const Strides& strides)
: Op({input})
, m_strides(strides)
{
constructor_validate_and_infer_types();
......
......@@ -32,7 +32,7 @@ namespace ngraph
///
/// \param input Input
/// \param strides Stride to reorganize input by
ReorgYolo(const std::shared_ptr<Node>& input, const Strides& strides);
ReorgYolo(const Output<Node>& input, const Strides& strides);
void validate_and_infer_types() override;
......
......@@ -21,12 +21,12 @@ using namespace ngraph;
const string op::ROIPooling::type_name{"ROIPooling"};
op::ROIPooling::ROIPooling(const shared_ptr<Node>& input,
const shared_ptr<Node>& coords,
op::ROIPooling::ROIPooling(const Output<Node>& input,
const Output<Node>& coords,
const Shape& output_size,
const float spatial_scale,
const string& method)
: Op(check_single_output_args({input, coords}))
: Op({input, coords})
, m_output_size(output_size)
, m_spatial_scale(spatial_scale)
, m_method(method)
......
......@@ -35,8 +35,8 @@ namespace ngraph
/// \param output_size Height/Width of ROI output features
/// \param spatial_scale Ratio of input feature map over input image size
/// \param method Method of pooling - Max or Bilinear
ROIPooling(const std::shared_ptr<Node>& input,
const std::shared_ptr<Node>& coords,
ROIPooling(const Output<Node>& input,
const Output<Node>& coords,
const Shape& output_size,
const float spatial_scale,
const std::string& method);
......
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