pub struct IElementWiseLayer { /* private fields */ }Expand description
IElementWiseLayer
A elementwise layer in a network definition.
This layer applies a per-element binary operation between corresponding elements of two tensors.
The input tensors must have the same rank. For each dimension, their lengths must match, or one of them must be one. In the latter case, the tensor is broadcast along that axis.
The output tensor has the same rank as the inputs. For each output dimension, its length is equal to the lengths of the corresponding input dimensions if they match, otherwise it is equal to the length that is not one.
When running this layer on the DLA with Int8 data type, the dynamic ranges of two input tensors shall be equal. If the dynamic ranges are generated using calibrator, the largest value shall be used.
Do not inherit from this class, as doing so will break forward-compatibility of the API and ABI.
Implementations§
Source§impl IElementWiseLayer
impl IElementWiseLayer
Sourcepub fn setOperation(self: Pin<&mut IElementWiseLayer>, op: ElementWiseOperation)
pub fn setOperation(self: Pin<&mut IElementWiseLayer>, op: ElementWiseOperation)
Set the binary operation for the layer.
DLA supports only kSUM, kPROD, kMAX, kMIN, and kSUB.
See [getOperation()], ElementWiseOperation
See [getBiasWeights()]
Sourcepub fn getOperation(self: &IElementWiseLayer) -> ElementWiseOperation
pub fn getOperation(self: &IElementWiseLayer) -> ElementWiseOperation
Get the binary operation for the layer.
See [setOperation()], ElementWiseOperation
See [setBiasWeights()]