LinearRegressionHead
- class lightning_pose.models.heads.LinearRegressionHead
Bases:
ModuleLinear regression head that converts 2D feature maps to a vector of (x, y) coordinates.
Methods Summary
forward(features)Define the computation performed at every call.
Methods Documentation
- forward(features: Tensor, {'__torchtyping__': True, 'details': ('batch', 'features', 'height', 'width'), 'cls_name': 'TensorType'}]) Tensor, {'__torchtyping__': True, 'details': ('batch', 'coordinates',), 'cls_name': 'TensorType'}][source]
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- __init__(in_channels: int, num_targets: int)[source]
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- __new__(**kwargs)