pub fn call_dropout_layer<T: 'static, D: 'static, Sh>(
    use_dropout_enum: UseDropoutEnum<T>,
    shape: Sh,
) -> DropOut<T, D>
where
    T: CrateFloat,
    D: Dimension,
    Sh: ShapeBuilder<Dim = D>,
{
    if let UseDropoutEnum::Use(ratio) = use_dropout_enum {
        DropOut::new(ratio, shape)
    } else {
        DropOut::new(cast_t2u(0.0), shape)
    }
}
/// validate UseDropoutEnum and generate an appropriate layer
validate UseDropoutEnum and generate an appropriate layer
validate UseDropoutEnum and generate an appropriate layer
pub fn call_dropout_layer<T: 'static, D: 'static, Sh>(
    use_dropout_enum: UseDropoutEnum<T>,
    shape: Sh,
) -> DropOut<T, D>
where
    T: CrateFloat,
    D: Dimension,
    Sh: ShapeBuilder<Dim = D>,
{
    if let UseDropoutEnum::Use(ratio) = use_dropout_enum {
        DropOut::new(ratio, shape)
    } else {
        DropOut::new(cast_t2u(0.0), shape)
    }
}
pub fn call_dropout_layer < T : ' static , D : ' static , Sh > ( use_dropout_enum : UseDropoutEnum < T > , shape : Sh , ) -> DropOut < T , D > where T : CrateFloat , D : Dimension , Sh : ShapeBuilder < Dim = D > , { if let UseDropoutEnum :: Use ( ratio ) = use_dropout_enum { DropOut :: new ( ratio , shape ) } else { DropOut :: new ( cast_t2u ( 0.0 ) , shape ) } }
validate UseDropoutEnum and generate an appropriate layer
validate UseDropoutEnum and generate an appropriate layer
use_dropout_enum
UseDropoutEnum<T>
shape
Sh
use_dropout_enum
UseDropoutEnum<T>
shape
Sh