Skip to content

← elementwise_math package

Softmax

Apply the softmax function to the given data array.

The softmax normalizes the data so that the sum of the data along the specified axis is 1.0 and each individual data point is between 0.0 and 1.0, yielding what can be interpreted as a probability distribution. Note that the softmax function is not a smoothed version of the max function, but could be more accurately described as a smoothed version of an argmax function that returns the maximum in a one-hot encoded form (i.e., with a 1 at the maximal index and 0 everywhere else). The function is conventionally used in machine learning to normalize a vector of scores generated by some prediction function (e.g., logits) to a categorical probability distribution. More Info... Version 1.0.0

Ports/Properties

data

Data to process.

  • verbose name: Data
  • default value: None
  • port type: DataPort
  • value type: AnyNumeric (can be None)
  • data direction: INOUT

axis

Axis along which the data will have the softmax applied. You can also enter the axis label here as in feature.mylabel.

  • verbose name: Axis
  • default value: statistic
  • port type: ComboPort
  • value type: str (can be None)

stream

Stream name on which to operate; if unspecified, all streams containing the specified axis will be modified. Wildcards are supported, so mystream* will operate on all streams starting with mystream.

  • verbose name: Stream
  • default value:
  • port type: StringPort
  • value type: str (can be None)

stream_name

  • verbose name: Stream Name
  • default value: None
  • port type: AliasPort
  • value type: str (can be None)

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

  • verbose name: Set Breakpoint (Debug Only)
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

  • verbose name: Metadata
  • default value: {}
  • port type: DictPort
  • value type: dict (can be None)