class ov::descriptor::Tensor¶
Overview¶
Compile-time descriptor of a first-class value that is a tensor. More…
#include <tensor.hpp>
class Tensor
{
public:
// construction
Tensor(
const element::Type& element_type,
const PartialShape& pshape,
const std::string& name
);
Tensor(
const element::Type& element_type,
const PartialShape& pshape,
Node \* node,
size_t node_output_number
);
Tensor(const Tensor&);
// methods
Tensor& operator = (const Tensor&);
const std::string& get_name() const;
void set_name(const std::string& name);
std::string get_any_name() const;
const std::unordered_set<std::string>& get_names() const;
void set_names(const std::unordered_set<std::string>& names);
void add_names(const std::unordered_set<std::string>& names);
void set_tensor_type(
const element::Type& element_type,
const PartialShape& pshape
);
void set_element_type(const element::Type& elemenet_type);
void set_partial_shape(const PartialShape& partial_shape);
void set_lower_value(const ngraph::HostTensorPtr& value);
void set_upper_value(const ngraph::HostTensorPtr& value);
void set_value_label(const TensorLabel& value_label);
void invalidate_values();
const element::Type& get_element_type() const;
const Shape& get_shape() const;
const PartialShape& get_partial_shape() const;
ngraph::HostTensorPtr get_lower_value() const;
ngraph::HostTensorPtr get_upper_value() const;
TensorLabel get_value_label() const;
bool has_and_set_bound() const;
size_t size() const;
RTMap& get_rt_info();
const RTMap& get_rt_info() const;
};
Detailed Documentation¶
Compile-time descriptor of a first-class value that is a tensor.
Methods¶
void set_lower_value(const ngraph::HostTensorPtr& value)
sets lower bound value description
void set_upper_value(const ngraph::HostTensorPtr& value)
sets upper bound value description
void set_value_label(const TensorLabel& value_label)
sets value label description
void invalidate_values()
unsets bound value descriptions
ngraph::HostTensorPtr get_lower_value() const
gets lower bound value description
ngraph::HostTensorPtr get_upper_value() const
gets upper bound value description
TensorLabel get_value_label() const
gets upper bound value description
bool has_and_set_bound() const
checks if lower and upper bound are set and point to the same HostTensor