class InferenceEngine::Data¶
Overview¶
This class represents the main Data representation node. More…
#include <ie_data.h>
class Data
{
public:
// construction
Data(, , );
Data(, );
Data();
// methods
Data&const Data& operator = ();
bool isInitialized() const;
voidconst SizeVector& setDims();
voidLayout setLayout();
voidconst SizeVector&Layout reshape(, );
voidconst std::initializer_list<size_t>&Layout reshape(, );
Layout getLayout() const;
const TensorDesc& getTensorDesc() const;
const Precision& getPrecision() const;
voidconst Precision& setPrecision();
const SizeVector& getDims() const;
const std::string& getName() const;
voidconst std::string& setName();
const UserValue& getUserObject() const;
};
Detailed Documentation¶
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.
Construction¶
Data(, , )
An empty constructor (dimensionless)
Parameters:
name |
Name of the data node |
_precision |
Precision of the data |
layout |
Data layout |
Data(, )
A constructor with tensor descriptor.
Parameters:
name |
Name of the data node |
desc |
Tensor descriptor |
Data()
A copy constructor.
Parameters:
data |
A data object to copy from |
Methods¶
Data&const Data& operator = ()
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.
voidconst SizeVector& setDims()
Sets the data dimensions.
After the current node is marked as resolved.
Parameters:
a_dims |
Tensor dimensions to set |
voidLayout setLayout()
Sets the layout value for this Data instance.
Parameters:
layout |
Layout value to set |
voidconst SizeVector&Layout reshape(, )
changes dims and layout at same time
Parameters:
dims |
new dimensions |
layout |
new layout |
voidconst std::initializer_list<size_t>&Layout reshape(, )
changes dims and layout at same time
Deprecated Use InferenceEngine::Data::reshape(const SizeVector&, Layout)
Parameters:
dims |
new dimensions |
layout |
new layout |
Layout getLayout() const
Gets the layout value for this Data instance.
Returns:
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
voidconst Precision& setPrecision()
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
voidconst std::string& setName()
Sets a name the Data object.
Parameters:
newName |
Name of the data node |
const UserValue& getUserObject() const
Returns:
convenient arbitrary user data holder