src.model.deeplearn.layer.drop_ground_row
Classes
|
- class src.model.deeplearn.layer.drop_ground_row.DropGroundRow(*args, **kwargs)
- Author:
Alberto M. Esmoris Pena
Tiny utility layer that strips the leading “ground row” from a sparse-conv tensor. Used by the SpConv architecture wherever an active-cell view is needed before a Dense / BatchNormalization / Activation call.
The SpConv layer stack carries every per-depth tensor in its padded form, that is, with an extra ground row at index 0 holding zeros. The ground row is the gather target for the “missing neighbor” sentinel value 0 in the dense neighbor tables; everything else operates on the active-cell view obtained by dropping row 0. This dedicated layer:
exposes a stable name for serialization / debugging;
bakes the slicing into one call site instead of an anonymous
Lambda(lambda t: t[1:])wrapper at every consumer;declares
supports_masking = Trueso any upstream-attached Keras mask propagates correctly.
The output has shape
(input_rows - 1, *input_features).- __init__(**kwargs)
- Parameters:
kwargs – Forwarded to
Layer/ Keras base.nameis the standard knob.
- call(inputs, training=False, mask=False)
- Parameters:
inputs – Padded sparse-conv tensor with shape
(1 + R, ...). Row 0 is the ground row.- Returns:
The active-cell view
inputs[1:]with shape(R, ...).
- compute_output_shape(input_shape)
- get_config()
Obtain the dictionary specifying how to serialize the layer.
- Returns:
The dictionary with the necessary data to serialize the layer.
- Return type:
dict