class ngraph::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
        );

    // methods

    NGRAPH_DEPRECATED("get_name() is deprecated! Please use get_names() instead.") const std NGRAPH_DEPRECATED("set_name() is deprecated! Please use set_names() instead.") void set_name(const std const std::unordered_set<std::string>& get_names() const;
    void set_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 HostTensorPtr& value);
    void set_upper_value(const HostTensorPtr& value);
    void invalidate_values();
    const element::Type& get_element_type() const;
    const Shape& get_shape() const;
    const PartialShape& get_partial_shape() const;
    HostTensorPtr get_lower_value() const;
    HostTensorPtr get_upper_value() const;
    bool has_and_set_bound() const;
    size_t size() const;
};

Detailed Documentation

Compile-time descriptor of a first-class value that is a tensor.

Methods

void set_lower_value(const HostTensorPtr& value)

sets lower bound value description

void set_upper_value(const HostTensorPtr& value)

sets upper bound value description

void invalidate_values()

unsets bound value descriptions

HostTensorPtr get_lower_value() const

gets lower bound value description

HostTensorPtr get_upper_value() 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