min.hpp
1 //*****************************************************************************
2 // Copyright 2017-2021 Intel Corporation
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //*****************************************************************************
16 
17 #pragma once
18 
19 #include "ngraph/op/util/arithmetic_reduction.hpp"
20 #include "ngraph/op/util/arithmetic_reductions_keep_dims.hpp"
21 
22 namespace ngraph
23 {
24  namespace op
25  {
26  namespace v1
27  {
28  class NGRAPH_API ReduceMin : public util::ArithmeticReductionKeepDims
29  {
30  public:
31  static constexpr NodeTypeInfo type_info{"ReduceMin", 1};
32  const NodeTypeInfo& get_type_info() const override { return type_info; }
33  /// \brief Constructs a summation operation.
34  ReduceMin() = default;
35  /// \brief Constructs a summation operation.
36  ///
37  /// \param arg The tensor to be summed.
38  /// \param reduction_axes The axis positions (0-based) to be eliminated.
39  /// \param keep_dims If set to 1 it holds axes that are used for reduction.
40  ReduceMin(const Output<Node>& arg,
41  const Output<Node>& reduction_axes,
42  bool keep_dims = false);
43 
44  virtual std::shared_ptr<Node>
45  clone_with_new_inputs(const OutputVector& new_args) const override;
46 
47  bool evaluate(const HostTensorVector& outputs,
48  const HostTensorVector& inputs) const override;
49  bool evaluate_lower(const HostTensorVector& outputs) const override;
50  bool evaluate_upper(const HostTensorVector& outputs) const override;
51  };
52  }
53  }
54 }
A handle for one of a node's outputs.
Definition: node_output.hpp:42
Definition: arithmetic_reductions_keep_dims.hpp:29
Definition: min.hpp:29
ReduceMin(const Output< Node > &arg, const Output< Node > &reduction_axes, bool keep_dims=false)
Constructs a summation operation.
bool evaluate(const HostTensorVector &outputs, const HostTensorVector &inputs) const override
Evaluates the op on input_values putting results in output_values.
const NodeTypeInfo & get_type_info() const override
Definition: min.hpp:32
ReduceMin()=default
Constructs a summation operation.
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:28
Definition: type.hpp:39