TensorRT
|
Layer that represents a Matrix Multiplication. More...
#include <NvInfer.h>
Public Member Functions | |
virtual void | setTranspose (int index, bool val)=0 |
Set the transpose flag for an input tensor. More... | |
virtual bool | getTranspose (int index) const =0 |
Get the transpose flag for an input tensor. More... | |
Public Member Functions inherited from nvinfer1::ILayer | |
virtual LayerType | getType () const =0 |
Return the type of a layer. More... | |
virtual void | setName (const char *name)=0 |
Set the name of a layer. More... | |
virtual const char * | getName () const =0 |
Return the name of a layer. More... | |
virtual int | getNbInputs () const =0 |
Get the number of inputs of a layer. | |
virtual ITensor * | getInput (int index) const =0 |
Get the layer input corresponding to the given index. More... | |
virtual int | getNbOutputs () const =0 |
Get the number of outputs of a layer. | |
virtual ITensor * | getOutput (int index) const =0 |
Get the layer output corresponding to the given index. More... | |
Layer that represents a Matrix Multiplication.
Let A be getInput(0) and B be getInput(1).
Tensors A and B must have equal rank, which must be at least 2.
When A and B are matrices, computes op(A) * op(B), where: op(x)=x if transpose == false op(x)=transpose(x) if transpose == true Transposition is of the last two dimensions. Inputs of higher rank are treated as collections of matrices.
For a dimension that is not one of the last two dimensions: If the dimension is 1 for one of the tensors but not the other tensor, the former tensor is broadcast along that dimension to match the dimension of the latter tensor.
|
pure virtual |
Get the transpose flag for an input tensor.
index | Input tensor number (0 or 1). |
|
pure virtual |
Set the transpose flag for an input tensor.
index | Input tensor number (0 or 1). |
val | New transpose flag. |