pub fn call_batch_norm_layer<T: 'static, D: 'static, Sh>(
    use_batch_norm: UseBatchNormEnum<T>,
    shape: Sh,
    batch_axis: usize,
) -> BatchNormalization<T, D>
where
    T: CrateFloat,
    D: Dimension + RemoveAxis,
    Sh: ShapeBuilder<Dim = D>,
{
    if let UseBatchNormEnum::Use(momentum) = use_batch_norm {
        BatchNormalization::new(momentum, batch_axis, shape)
    } else {
        BatchNormalization::new(cast_t2u(0.0), batch_axis, shape)
    }
}
/// validate UseBatchNormEum and generate an appropriate layer
validate UseBatchNormEum and generate an appropriate layer
validate UseBatchNormEum and generate an appropriate layer
pub fn call_batch_norm_layer<T: 'static, D: 'static, Sh>(
    use_batch_norm: UseBatchNormEnum<T>,
    shape: Sh,
    batch_axis: usize,
) -> BatchNormalization<T, D>
where
    T: CrateFloat,
    D: Dimension + RemoveAxis,
    Sh: ShapeBuilder<Dim = D>,
{
    if let UseBatchNormEnum::Use(momentum) = use_batch_norm {
        BatchNormalization::new(momentum, batch_axis, shape)
    } else {
        BatchNormalization::new(cast_t2u(0.0), batch_axis, shape)
    }
}
pub fn call_batch_norm_layer < T : ' static , D : ' static , Sh > ( use_batch_norm : UseBatchNormEnum < T > , shape : Sh , batch_axis : usize , ) -> BatchNormalization < T , D > where T : CrateFloat , D : Dimension + RemoveAxis , Sh : ShapeBuilder < Dim = D > , { if let UseBatchNormEnum :: Use ( momentum ) = use_batch_norm { BatchNormalization :: new ( momentum , batch_axis , shape ) } else { BatchNormalization :: new ( cast_t2u ( 0.0 ) , batch_axis , shape ) } }
validate UseBatchNormEum and generate an appropriate layer
validate UseBatchNormEum and generate an appropriate layer
use_batch_norm
UseBatchNormEnum<T>
shape
Sh
batch_axis
usize
use_batch_norm
UseBatchNormEnum<T>
shape
Sh
batch_axis
usize