pub struct SliceDynamicLayerParams {
pub begin_masks: Vec<bool>,
pub end_ids: Vec<i64>,
pub end_masks: Vec<bool>,
pub strides: Vec<i64>,
pub squeeze_masks: Vec<bool>,
}Expand description
A layer that extracts a slice of size (end - begin) / stride
from the given input tensor.
Support negative indexing and negative strides.
See “SliceStaticLayerParams” for the description and an example of the functionality of the layer.
Requires 2 to 7 inputs and produces 1 output. Rank of the output is same as the rank of the first input unless squeezeMask is set.
Value of beginIds, beginMasks, endIds, endMasks, strides can be passed in either as dynamic inputs or as static parameters. Lengths of all the parameters or inputs from 2-6 must equal the rank of the first input.
The 2nd input represents the “beginIds”. The 3rd input, if present, corresponds to “endIds”. In this case the value of the “endIds” parameter is ignored. The 4th input, if present, corresponds to “strides”. In this case the value of the “strides” parameter is ignored. The 5th input, if present, corresponds to “beginMasks”. In this case the value of the “beginMasks” parameter is ignored. The 6th input, if present, corresponds to “endMasks”. In this case the value of the “endMasks” parameter is ignored. The 7th input, if present, corresponds to “squeezeMasks”. In this case the value of the “squeezeMasks” parameter is ignored.
Fields§
§begin_masks: Vec<bool>§end_ids: Vec<i64>§end_masks: Vec<bool>§strides: Vec<i64>§squeeze_masks: Vec<bool>Trait Implementations§
Source§impl Clone for SliceDynamicLayerParams
impl Clone for SliceDynamicLayerParams
Source§fn clone(&self) -> SliceDynamicLayerParams
fn clone(&self) -> SliceDynamicLayerParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SliceDynamicLayerParams
impl Debug for SliceDynamicLayerParams
Source§impl Default for SliceDynamicLayerParams
impl Default for SliceDynamicLayerParams
Source§impl Hash for SliceDynamicLayerParams
impl Hash for SliceDynamicLayerParams
Source§impl Message for SliceDynamicLayerParams
impl Message for SliceDynamicLayerParams
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for SliceDynamicLayerParams
impl PartialEq for SliceDynamicLayerParams
Source§fn eq(&self, other: &SliceDynamicLayerParams) -> bool
fn eq(&self, other: &SliceDynamicLayerParams) -> bool
self and other values to be equal, and is used by ==.