klyn.math.nn.serialization.LayerCodec.outputShape
method
public static outputShape(layer as Layer<T>, input as IList<Long>) as IList<Long>
Description

Computes output dimensions without allocating trainable parameters.

Parameters
ParameterDescription
layerAllowlisted stage. @param input Positive sample dimensions.
Returns

Checked output shape. @throws ValueException for incompatible shapes.

Example

output = LayerCodec<Float>.outputShape(layer, [28l, 28l, 1l])