softmin(input: Tensor, dim: int | None = None, _stacklevel: int = 3, dtype: DTypeLike | None = None)Softmin — softmax applied to the negation of the input.
Parameters
inputTensorInput tensor of any shape.
dimint or None= NoneDimension along which softmin is computed.
_stacklevelint= 3Internal stack level for the implicit-dimension warning.
dtypeDTypeLike or None= NoneTarget floating-point dtype to cast
input to before softmin.Returns
TensorTensor of the same shape with values summing to 1 along dim.
Notes
Examples
>>> import lucid
>>> from lucid.nn.functional import softmin
>>> x = lucid.tensor([[1.0, 2.0, 3.0]])
>>> softmin(x, dim=1)
tensor([[0.6652, 0.2447, 0.09003]])