pub struct IReverseSequenceLayer { /* private fields */ }Expand description
IReverseSequenceLayer
A ReverseSequence layer in a network definition.
This layer performs batch-wise reversal, which slices the input tensor along the axis batchAxis. For the i-th slice, the operation reverses the first N elements, specified by the corresponding i-th value in sequenceLens, along sequenceAxis and keeps the remaining elements unchanged. The output tensor will have the same shape as the input tensor.
Do not inherit from this class, as doing so will break forward-compatibility of the API and ABI.
Implementations§
Source§impl IReverseSequenceLayer
impl IReverseSequenceLayer
Sourcepub fn setBatchAxis(self: Pin<&mut IReverseSequenceLayer>, batchAxis: i32)
pub fn setBatchAxis(self: Pin<&mut IReverseSequenceLayer>, batchAxis: i32)
Set the batch axis. Default is 1.
batchAxis should be between zero (inclusive) and the rank of input (exclusive), and different from sequenceAxis. Otherwise, ErrorCode::kINVALID_ARGUMENT will be triggered.
See [setBatchAxis()]
Sourcepub fn getBatchAxis(self: &IReverseSequenceLayer) -> i32
pub fn getBatchAxis(self: &IReverseSequenceLayer) -> i32
Return the batch axis. Return 1 if no batch axis was set.
See [getBatchAxis()]
Sourcepub fn setSequenceAxis(self: Pin<&mut IReverseSequenceLayer>, sequenceAxis: i32)
pub fn setSequenceAxis(self: Pin<&mut IReverseSequenceLayer>, sequenceAxis: i32)
Set the sequence axis. Default is 0.
sequenceAxis should be between zero (inclusive) and the rank of input (exclusive), and different from batchAxis. Otherwise, ErrorCode::kINVALID_ARGUMENT will be triggered.
See [setSequenceAxis()]
Sourcepub fn getSequenceAxis(self: &IReverseSequenceLayer) -> i32
pub fn getSequenceAxis(self: &IReverseSequenceLayer) -> i32
Return the sequence axis. Return 0 if no sequence axis was set.
See [getSequenceAxis()]