crested.tl.zoo.utils.dense_block#
- crested.tl.zoo.utils.dense_block(inputs, units, activation, dropout=0.5, l2=1e-05, bn_gamma=None, bn_momentum=0.9, normalization='batch', name_prefix=None, use_bias=True)#
Dense building block.
- Parameters:
inputs (
KerasTensor) – Input tensor.units (
int) – Number of units in the dense layer.activation (
str) – Activation function applied after dense layer.dropout (
float(default:0.5)) – Dropout rate (default is 0.5).l2 (
float(default:1e-05)) – L2 regularization weight (default is 1e-5).bn_gamma (
str|None(default:None)) – Gamma initializer for batch normalization.bn_momentum (
float(default:0.9)) – Batch normalization momentum (default is 0.90).normalization (
str(default:'batch')) – Type of normalization (‘batch’ or ‘layer’).name_prefix (
str|None(default:None)) – Prefix for layer names.use_bias (
bool(default:True)) – Whether to use bias in the dense layer (default is True).
- Return type:
KerasTensor- Returns:
The output tensor of the dense block.