pub struct LayerDef {
pub size: usize,
pub activation: Activation,
}Expand description
Definition of a layer’s shape and activation, used for topology configuration.
§Examples
use pc_rl_core::activation::Activation;
use pc_rl_core::layer::LayerDef;
let def = LayerDef { size: 64, activation: Activation::Tanh };
assert_eq!(def.size, 64);Fields§
§size: usizeNumber of neurons in this layer.
activation: ActivationActivation function applied after the linear transform.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LayerDef
impl<'de> Deserialize<'de> for LayerDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LayerDef
impl RefUnwindSafe for LayerDef
impl Send for LayerDef
impl Sync for LayerDef
impl Unpin for LayerDef
impl UnsafeUnpin for LayerDef
impl UnwindSafe for LayerDef
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