pub struct AdaptiveAvgPool2dConfig {
pub output_size: [usize; 2],
}Expand description
Configuration to create a 2D adaptive avg pooling layer using the init function.
Fields§
§output_size: [usize; 2]The size of the output.
Implementations§
Source§impl AdaptiveAvgPool2dConfig
impl AdaptiveAvgPool2dConfig
Sourcepub fn new(output_size: [usize; 2]) -> AdaptiveAvgPool2dConfig
pub fn new(output_size: [usize; 2]) -> AdaptiveAvgPool2dConfig
Create a new instance of the config.
Source§impl AdaptiveAvgPool2dConfig
impl AdaptiveAvgPool2dConfig
Sourcepub fn init(&self) -> AdaptiveAvgPool2d
pub fn init(&self) -> AdaptiveAvgPool2d
Initialize a new adaptive avg pool 2d module.
Trait Implementations§
Source§impl Clone for AdaptiveAvgPool2dConfig
impl Clone for AdaptiveAvgPool2dConfig
Source§fn clone(&self) -> AdaptiveAvgPool2dConfig
fn clone(&self) -> AdaptiveAvgPool2dConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Config for AdaptiveAvgPool2dConfig
impl Config for AdaptiveAvgPool2dConfig
Source§fn load<P>(file: P) -> Result<Self, ConfigError>
fn load<P>(file: P) -> Result<Self, ConfigError>
Loads the configuration from a file. Read more
Source§fn load_binary(data: &[u8]) -> Result<Self, ConfigError>
fn load_binary(data: &[u8]) -> Result<Self, ConfigError>
Loads the configuration from a binary buffer. Read more
Source§impl Debug for AdaptiveAvgPool2dConfig
impl Debug for AdaptiveAvgPool2dConfig
Source§impl<'de> Deserialize<'de> for AdaptiveAvgPool2dConfig
impl<'de> Deserialize<'de> for AdaptiveAvgPool2dConfig
Source§fn deserialize<D>(
deserializer: D,
) -> Result<AdaptiveAvgPool2dConfig, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<AdaptiveAvgPool2dConfig, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for AdaptiveAvgPool2dConfig
impl Display for AdaptiveAvgPool2dConfig
Source§impl Serialize for AdaptiveAvgPool2dConfig
impl Serialize for AdaptiveAvgPool2dConfig
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for AdaptiveAvgPool2dConfig
impl RefUnwindSafe for AdaptiveAvgPool2dConfig
impl Send for AdaptiveAvgPool2dConfig
impl Sync for AdaptiveAvgPool2dConfig
impl Unpin for AdaptiveAvgPool2dConfig
impl UnwindSafe for AdaptiveAvgPool2dConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more