pub struct ActivationFn {
pub func: Arc<dyn Activation + Send + Sync>,
pub scope: ActivationScope,
/* private fields */
}
Expand description
An activation function object that implements fmt::Debug
and is Send
Fields§
§func: Arc<dyn Activation + Send + Sync>
The actual activation function.
scope: ActivationScope
The scope defining where the activation function can appear.
Implementations§
Source§impl ActivationFn
impl ActivationFn
Sourcepub fn new(
func: Arc<dyn Activation + Send + Sync>,
scope: ActivationScope,
name: String,
) -> Self
pub fn new( func: Arc<dyn Activation + Send + Sync>, scope: ActivationScope, name: String, ) -> Self
Creates a new ActivationFn object.
Trait Implementations§
Source§impl Clone for ActivationFn
impl Clone for ActivationFn
Source§fn clone(&self) -> ActivationFn
fn clone(&self) -> ActivationFn
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 Debug for ActivationFn
impl Debug for ActivationFn
Source§impl<'a> Deserialize<'a> for ActivationFn
impl<'a> Deserialize<'a> for ActivationFn
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ActivationFn
impl PartialEq for ActivationFn
Auto Trait Implementations§
impl Freeze for ActivationFn
impl !RefUnwindSafe for ActivationFn
impl Send for ActivationFn
impl Sync for ActivationFn
impl Unpin for ActivationFn
impl !UnwindSafe for ActivationFn
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