Class InferenceEngine::Data¶
-
class Data¶
This class represents the main Data representation node.
- Deprecated:
The Inference Engine API is deprecated and will be removed in the 2024.0 release. For instructions on transitioning to the new API, please refer to https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html
The NN graphs are di-graphs consisting of data nodes and layer nodes.
Public Functions
-
Data(const std::string &name, Precision _precision, Layout layout = NCHW)¶
An empty constructor (dimensionless)
-
Data(const std::string &name, const TensorDesc &desc)¶
A constructor with tensor descriptor.
- Parameters
name – Name of the data node
desc – Tensor descriptor
-
Data &operator=(const Data &data)¶
An assignment operator.
- Parameters
data – A data object to copy from
- Returns
An assigned object
-
bool isInitialized() const¶
Checks if the current node is resolved.
- Returns
true if resolved, false otherwise.
-
void setDims(const SizeVector &a_dims)¶
Sets the data dimensions.
After the current node is marked as resolved.
- Parameters
a_dims – Tensor dimensions to set
-
void setLayout(Layout layout)¶
Sets the layout value for this Data instance.
- Parameters
layout – Layout value to set
-
void reshape(const SizeVector &dims, Layout layout)¶
changes dims and layout at same time
- Parameters
dims – new dimensions
layout – new layout
-
void reshape(const std::initializer_list<size_t> &dims, Layout layout)¶
changes dims and layout at same time
- Deprecated:
Use InferenceEngine::Data::reshape(const SizeVector&, Layout)
- Parameters
dims – new dimensions
layout – new layout
-
const TensorDesc &getTensorDesc() const¶
Gets Tensor descriptor reference.
- Returns
reference to TensorDesc
-
const Precision &getPrecision() const¶
Gets a precision type of this Data instance.
- Returns
Precision type
-
void setPrecision(const Precision &precision)¶
Sets a precision type of this Data instance.
- Parameters
precision – Precision of the data
-
const SizeVector &getDims() const¶
- Returns
data dimensions
-
const std::string &getName() const¶
- Returns
name of the data object