(ctx, input, dim=0)
return output
input (FloatTensor): any shape
        returns (FloatTensor): same shape with sparsemax computed on given dim
input (FloatTensor): any shape
        returns (FloatTensor): same shape with sparsemax computed on given dim
input ( FloatTensor ) : any shape returns ( FloatTensor ) : same shape with sparsemax computed on given dim
def forward(ctx, input, dim=0):
        """
        input (FloatTensor): any shape
        returns (FloatTensor): same shape with sparsemax computed on given dim
        """
        ctx.dim = dim
        tau_z, k_z = threshold_and_support(input, dim=dim)
        output = torch.clamp(input - tau_z, min=0)
        ctx.save_for_backward(k_z, output)
        return output
def forward ( ctx , input , dim = 0 ) : ctx . dim = dim tau_z , k_z = threshold_and_support ( input , dim = dim ) output = torch . clamp ( input - tau_z , min = 0 ) ctx . save_for_backward ( k_z , output ) return output