pub struct SoftmaxLossLayer {
pub size: usize,
pub lr_params: CpuParams,
/* private fields */
}Fields§
§size: usize§lr_params: CpuParamsImplementations§
Trait Implementations§
Source§impl AbstractLayer for SoftmaxLossLayer
impl AbstractLayer for SoftmaxLossLayer
fn forward(&mut self, input: ParamsBlob) -> LayerForwardResult
fn backward_output( &mut self, prev_input: ParamsBlob, expected_vec: Array2D, ) -> LayerBackwardResult
fn layer_type(&self) -> &str
fn cpu_params(&self) -> Option<CpuParams>
fn set_cpu_params(&mut self, lp: CpuParams)
fn size(&self) -> usize
fn metrics(&self) -> Option<&HashMap<String, f64>>
fn trainable_bufs(&self) -> TrainableBufsIds<'_>
fn serializable_bufs(&self) -> &[i32]
fn copy_layer(&self) -> Box<dyn AbstractLayer>
fn clone_layer(&self) -> Box<dyn AbstractLayer>
fn set_input_shape(&mut self, sh: &[usize])
fn forward_input(&mut self, _input_data: Array2D) -> LayerForwardResult
Source§fn backward(
&mut self,
_prev_input: ParamsBlob,
_input: ParamsBlob,
) -> LayerBackwardResult
fn backward( &mut self, _prev_input: ParamsBlob, _input: ParamsBlob, ) -> LayerBackwardResult
returns out_values and array of weights
fn set_batch_size(&mut self, batch_size: usize)
Source§impl Clone for SoftmaxLossLayer
impl Clone for SoftmaxLossLayer
Source§fn clone(&self) -> SoftmaxLossLayer
fn clone(&self) -> SoftmaxLossLayer
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 Default for SoftmaxLossLayer
impl Default for SoftmaxLossLayer
Source§fn default() -> SoftmaxLossLayer
fn default() -> SoftmaxLossLayer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SoftmaxLossLayer
impl !RefUnwindSafe for SoftmaxLossLayer
impl !Send for SoftmaxLossLayer
impl !Sync for SoftmaxLossLayer
impl Unpin for SoftmaxLossLayer
impl !UnwindSafe for SoftmaxLossLayer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more