Struct burn::nn::LinearConfig
source · pub struct LinearConfig {
pub d_input: usize,
pub d_output: usize,
pub bias: bool,
pub initializer: Initializer,
}Expand description
Configuration to create a Linear layer.
Fields§
§d_input: usizeThe size of the input features.
d_output: usizeThe size of the output features.
bias: boolIf a bias should be applied during the linear transformation.
initializer: InitializerThe type of function used to initialize neural network parameters
Implementations§
source§impl LinearConfig
impl LinearConfig
pub fn new(d_input: usize, d_output: usize) -> LinearConfig
source§impl LinearConfig
impl LinearConfig
pub fn with_bias(self, bias: bool) -> LinearConfig
pub fn with_initializer(self, initializer: Initializer) -> LinearConfig
Trait Implementations§
source§impl Clone for LinearConfig
impl Clone for LinearConfig
source§fn clone(&self) -> LinearConfig
fn clone(&self) -> LinearConfig
Returns a copy 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 LinearConfig
impl Config for LinearConfig
source§impl<'de> Deserialize<'de> for LinearConfig
impl<'de> Deserialize<'de> for LinearConfig
source§fn deserialize<D>(
deserializer: D
) -> Result<LinearConfig, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>( deserializer: D ) -> Result<LinearConfig, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for LinearConfig
impl Display for LinearConfig
source§impl Serialize for LinearConfig
impl Serialize for LinearConfig
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