pub struct FlattenLayerParams {
pub mode: i32,
}Expand description
A layer that flattens the input.
.. code::
y = FlattenLayer(x)Requires 1 input and produces 1 output.
Input
A blob with rank greater than equal to 3.
e.g.: Rank 4 blob represents [Batch, C, H, W]
For ranks greater than 3, the leading dimensions, starting from 0 to -4 (inclusive), are all treated as batch.
Output
Same rank as the input, such that last two dimensions are both 1.
e.g.: For rank 4 input, output shape is \[Batch, C * H * W, 1, 1\]
There are two X orders: CHANNEL_FIRST and CHANNEL_LAST.
CHANNEL_FIRST does not require data to be rearranged,
because row major ordering is used by internal storage.
CHANNEL_LAST requires data to be rearranged.
Fields§
§mode: i32Implementations§
Source§impl FlattenLayerParams
impl FlattenLayerParams
Sourcepub fn mode(&self) -> FlattenOrder
pub fn mode(&self) -> FlattenOrder
Returns the enum value of mode, or the default if the field is set to an invalid enum value.
Sourcepub fn set_mode(&mut self, value: FlattenOrder)
pub fn set_mode(&mut self, value: FlattenOrder)
Sets mode to the provided enum value.
Trait Implementations§
Source§impl Clone for FlattenLayerParams
impl Clone for FlattenLayerParams
Source§fn clone(&self) -> FlattenLayerParams
fn clone(&self) -> FlattenLayerParams
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 FlattenLayerParams
impl Debug for FlattenLayerParams
Source§impl Default for FlattenLayerParams
impl Default for FlattenLayerParams
Source§impl Hash for FlattenLayerParams
impl Hash for FlattenLayerParams
Source§impl Message for FlattenLayerParams
impl Message for FlattenLayerParams
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 FlattenLayerParams
impl PartialEq for FlattenLayerParams
Source§fn eq(&self, other: &FlattenLayerParams) -> bool
fn eq(&self, other: &FlattenLayerParams) -> bool
self and other values to be equal, and is used by ==.