flambe.nn.distance.distance

Module Contents

class flambe.nn.distance.distance.DistanceModule[source]

Bases: flambe.nn.module.Module

Implement a DistanceModule object.

forward(self, mat_1: Tensor, mat_2: Tensor)[source]

Performs a forward pass through the network.

Parameters:data (torch.Tensor) – The input data, as a float tensor
Returns:The encoded output, as a float tensor
Return type:torch.Tensor
class flambe.nn.distance.distance.MeanModule(detach_mean: bool = False)[source]

Bases: flambe.nn.module.Module

Implement a MeanModule object.

forward(self, data: Tensor)[source]

Performs a forward pass through the network.

Parameters:data (torch.Tensor) – The input data, as a float tensor
Returns:The encoded output, as a float tensor
Return type:torch.Tensor