reduce_mean.hpp
1 // Copyright (C) 2018-2021 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 #pragma once
6 
7 #include "ngraph/axis_set.hpp"
8 #include "ngraph/op/util/arithmetic_reductions_keep_dims.hpp"
9 
10 namespace ngraph
11 {
12  namespace op
13  {
14  namespace v1
15  {
17  {
18  public:
19  NGRAPH_RTTI_DECLARATION;
20  ReduceMean() = default;
21 
22  /// \param arg The tensor to be summed.
23  /// \param reduction_axes The axis positions (0-based) to be eliminated.
24  /// \param keep_dims If set to 1 it holds axes that are used for reduction.
26  const Output<Node>& reduction_axes,
27  bool keep_dims = false);
28 
29  size_t get_version() const override { return 1; }
30  std::shared_ptr<Node>
31  clone_with_new_inputs(const OutputVector& new_args) const override;
32 
33  bool evaluate(const HostTensorVector& outputs,
34  const HostTensorVector& inputs) const override;
35  bool has_evaluate() const override;
36  };
37  } // namespace v1
38  } // namespace op
39 } // namespace ngraph
A handle for one of a node's outputs.
Definition: node_output.hpp:33
Definition: arithmetic_reductions_keep_dims.hpp:17
Definition: reduce_mean.hpp:17
bool has_evaluate() const override
Allows to get information about availability of evaluate method for the current operation.
ReduceMean(const Output< Node > &arg, const Output< Node > &reduction_axes, bool keep_dims=false)
size_t get_version() const override
Definition: reduce_mean.hpp:29
bool evaluate(const HostTensorVector &outputs, const HostTensorVector &inputs) const override
Evaluates the op on input_values putting results in output_values.
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:16