Public Member Functions | Data Fields
InferenceEngine::Data Class Reference

This class represents the main Data representation node. More...

#include <ie_data.h>

Collaboration diagram for InferenceEngine::Data:
Collaboration graph
[legend]

Public Member Functions

 Data (const std::string &name, Precision _precision, Layout layout=NCHW)
 An empty constructor (dimensionless) More...
 
 Data (const std::string &name, const SizeVector &a_dims, Precision _precision, Layout layout=NCHW)
 A full constructor (with dimensions) More...
 
 Data (const std::string &name, const TensorDesc &desc)
 A constructor with tensor descriptor. More...
 
 Data (const Data &data)
 A copy constructor. More...
 
 ~Data ()
 A destructor.
 
Dataoperator= (const Data &)
 An assignment operator.
 
bool isInitialized () const
 Checks if the current node is resolved. More...
 
void setDims (const SizeVector &a_dims)
 Sets the data dimensions. After the current node is marked as resolved. More...
 
void setBatchSize (size_t batch_size)
 Sets the batch value in the data dimensions. Batch is defined as the last element in the dimensions vector. More...
 
void setLayout (Layout layout)
 Sets the layout value for this Data instance. More...
 
void reshape (const SizeVector &dims, Layout layout)
 changes dims and layout at same time More...
 
Layout getLayout () const
 Gets the layout value for this Data instance.
 
const TensorDescgetTensorDesc () const
 Gets Tensor descriptor reference. More...
 
const PrecisiongetPrecision () const
 Gets a precision type of this Data instance. More...
 
void setPrecision (const Precision &precision)
 Sets a precision type of this Data instance. More...
 
const SizeVectorgetDims () const
 
CNNLayerWeakPtrgetCreatorLayer ()
 
const std::string & getName () const
 
void setName (const std::string &newName)
 Sets a name the Data object. More...
 
std::map< std::string, CNNLayerPtr > & getInputTo ()
 returns child layers in di-graph
 
const UserValuegetUserObject () const
 

Data Fields

Precision precision
 A precision type of this Data instance. More...
 
Layout layout
 A data layout of this Data instance. More...
 
SizeVector dims
 A tensor dimension array (the order is opposite to the order in the IR: w,h,c,n) of this Data instance. More...
 
CNNLayerWeakPtr creatorLayer
 A pointer to the layer that creates this data element, null for input data elements. More...
 
std::string name
 A unique name that identifies this data node. More...
 
std::map< std::string, CNNLayerPtrinputTo
 A map of layers that use this node as input. It is useful for recursive NN graph traversal. More...
 
UserValue userObject
 A user utility place holder. More...
 

Detailed Description

This class represents the main Data representation node.

The NN graphs are di-graphs consisting of data nodes and layer nodes.

Constructor & Destructor Documentation

§ Data() [1/4]

InferenceEngine::Data::Data ( const std::string &  name,
Precision  _precision,
Layout  layout = NCHW 
)

An empty constructor (dimensionless)

Parameters
nameName of the data node
_precisionPrecision of the data

§ Data() [2/4]

InferenceEngine::Data::Data ( const std::string &  name,
const SizeVector a_dims,
Precision  _precision,
Layout  layout = NCHW 
)

A full constructor (with dimensions)

Parameters
nameName of the data node
a_dimsData tensor dimensions
_precisionPrecision of the data

§ Data() [3/4]

InferenceEngine::Data::Data ( const std::string &  name,
const TensorDesc desc 
)

A constructor with tensor descriptor.

Parameters
nameName of the data node
descTensor descriptor

§ Data() [4/4]

InferenceEngine::Data::Data ( const Data data)

A copy constructor.

Parameters
dataA data

Member Function Documentation

§ getCreatorLayer()

CNNLayerWeakPtr& InferenceEngine::Data::getCreatorLayer ( )
Returns
owner of this data layer, parent layer in di-graph

§ getDims()

const SizeVector& InferenceEngine::Data::getDims ( ) const
Returns
data dimensions

§ getName()

const std::string& InferenceEngine::Data::getName ( ) const
Returns
name of the data object

§ getPrecision()

const Precision& InferenceEngine::Data::getPrecision ( ) const

Gets a precision type of this Data instance.

Returns
Precision type

§ getTensorDesc()

const TensorDesc& InferenceEngine::Data::getTensorDesc ( ) const

Gets Tensor descriptor reference.

Returns
reference to TensorDesc

§ getUserObject()

const UserValue& InferenceEngine::Data::getUserObject ( ) const
Returns
convenient arbitrary user data holder

§ isInitialized()

bool InferenceEngine::Data::isInitialized ( ) const

Checks if the current node is resolved.

Returns
true if resolved, false otherwise.

§ reshape()

void InferenceEngine::Data::reshape ( const SizeVector dims,
Layout  layout 
)

changes dims and layout at same time

Parameters
dimsnew dimensions
layoutnew layout

§ setBatchSize()

void InferenceEngine::Data::setBatchSize ( size_t  batch_size)

Sets the batch value in the data dimensions. Batch is defined as the last element in the dimensions vector.

Deprecated:
Use Data::setDims to set batch size.
Parameters
batch_sizeBatch size to set

§ setDims()

void InferenceEngine::Data::setDims ( const SizeVector a_dims)

Sets the data dimensions. After the current node is marked as resolved.

Parameters
a_dimsTensor dimensions to set

§ setLayout()

void InferenceEngine::Data::setLayout ( Layout  layout)

Sets the layout value for this Data instance.

Parameters
layoutLayout value to set

§ setName()

void InferenceEngine::Data::setName ( const std::string &  newName)

Sets a name the Data object.

Parameters
nameName of the data node

§ setPrecision()

void InferenceEngine::Data::setPrecision ( const Precision precision)

Sets a precision type of this Data instance.

Parameters
precisionPrecision of the data

Field Documentation

§ creatorLayer

CNNLayerWeakPtr InferenceEngine::Data::creatorLayer

A pointer to the layer that creates this data element, null for input data elements.

Deprecated:
Use Data::getCreatorLayer

§ dims

SizeVector InferenceEngine::Data::dims

A tensor dimension array (the order is opposite to the order in the IR: w,h,c,n) of this Data instance.

Deprecated:
Use Data::getDims

§ inputTo

std::map<std::string, CNNLayerPtr> InferenceEngine::Data::inputTo

A map of layers that use this node as input. It is useful for recursive NN graph traversal.

Deprecated:
Use Data::getInputTo

§ layout

Layout InferenceEngine::Data::layout

A data layout of this Data instance.

Deprecated:
Use Data::getFormat

§ name

std::string InferenceEngine::Data::name

A unique name that identifies this data node.

Deprecated:
Use Data::getName

§ precision

Precision InferenceEngine::Data::precision

A precision type of this Data instance.

Deprecated:
Use Data::getPrecision

§ userObject

UserValue InferenceEngine::Data::userObject

A user utility place holder.

Deprecated:
Use Data::getUserObject

The documentation for this class was generated from the following file: