sleap.nn.architectures.common#

Common utilities for architecture and model building.

class sleap.nn.architectures.common.IntermediateFeature(tensor: Tensor, stride: int)[source]#

Intermediate feature tensor for use in skip connections.

This class is effectively a named tuple to store the stride (resolution) metadata.

tensor#

The tensor output from an intermediate layer.

Type:

tensorflow.python.framework.ops.Tensor

stride#

Stride of the tensor relative to the input.

Type:

int

property scale: float#

Return the absolute scale of the tensor relative to the input.

This is equivalent to the reciprocal of the stride, e.g., stride 2 => scale 0.5.