19 #include "ngraph/op/op.hpp"
38 static constexpr NodeTypeInfo type_info{
"NonZero", 3};
39 const NodeTypeInfo&
get_type_info()
const override {
return type_info; }
54 NonZero(
const Output<Node>& arg,
const std::string& output_type);
65 virtual std::shared_ptr<Node>
66 clone_with_new_inputs(
const OutputVector& new_args)
const override;
68 element::Type get_output_type()
const {
return m_output_type; }
69 void set_output_type(
element::Type output_type) { m_output_type = output_type; }
71 using Node::set_output_type;
73 bool evaluate(
const HostTensorVector& outputs,
74 const HostTensorVector& inputs)
const override;
NonZero(const Output< Node > &arg)
Constructs a NonZero operation.
NonZero()=default
Constructs a NonZero operation.
NonZero(const Output< Node > &arg, const std::string &output_type)
Constructs a NonZero operation.
const NodeTypeInfo & get_type_info() const override
Definition: non_zero.hpp:39
NonZero(const Output< Node > &arg, const element::Type &output_type)
Constructs a NonZero operation.
Definition: element_type.hpp:61
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:28
Visits the attributes of a node, primarily for serialization-like tasks.
Definition: attribute_visitor.hpp:70
NonZero operation returning indices of non-zero elements in the input tensor.
Definition: non_zero.hpp:36
void validate_and_infer_types() override
Verifies that attributes and inputs are consistent and computes output shapes and element types....
Root of all actual ops.
Definition: op.hpp:29