flambe.nn.softmax

Module Contents

class flambe.nn.softmax.SoftmaxLayer(input_size: int, output_size: int, take_log: bool = True)[source]

Bases: flambe.nn.module.Module

Implement an SoftmaxLayer module.

Can be used to form a classifier out of any encoder.

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