a tensor in a network definition
More...
#include <NvInfer.h>
a tensor in a network definition
virtual Dims nvinfer1::ITensor::getDimensions |
( |
| ) |
const |
|
pure virtual |
Get the dimensions of a tensor.
- Returns
- the dimensions of the layer
- See also
- setDimensions()
virtual const char* nvinfer1::ITensor::getName |
( |
| ) |
const |
|
pure virtual |
get the tensor name
- Returns
- the name, as a pointer to a NULL-terminated character sequence
- See also
- setName()
virtual DataType nvinfer1::ITensor::getType |
( |
| ) |
const |
|
pure virtual |
Get the data type of a tensor.
- Returns
- the data type of the tensor
- See also
- setType()
virtual void nvinfer1::ITensor::setDimensions |
( |
Dims |
dimensions | ) |
|
|
pure virtual |
Set the dimensions of a tensor.
For a network input the name is assigned by the application. For a network output it is computed based on the layer parameters and the inputs to the layer. If a tensor size or a parameter is modified in the network, the dimensions of all dependent tensors will be recomputed.
This call is only legal for network input tensors, since the dimensions of layer output tensors are inferred based on layer inputs and parameters.
- Parameters
-
dimensions | the dimensions of the tensor |
- See also
- getDimensions()
virtual void nvinfer1::ITensor::setName |
( |
const char * |
name | ) |
|
|
pure virtual |
Set the tensor name.
For a network input, the name is assigned by the application. For tensors which are layer outputs, a default name is assigned consisting of the layer name followed by the index of the output in brackets.
This method copies the name string
- Parameters
-
- See also
- getName()
virtual void nvinfer1::ITensor::setType |
( |
DataType |
type | ) |
|
|
pure virtual |
Set the data type of a tensor.
- Parameters
-
type | the data type of the tensor |
The type is unchanged if the type is invalid for the given tensor.
If the tensor is a network input or output, then the tensor type cannot be DataType::kINT8.
- See also
- getType()
The documentation for this class was generated from the following file: