def softmax(node, axes, name=None): # type: (Node, Iterable[int], str) -> Node """Apply softmax operation on each element of input tensor. :param node: The tensor providing input data. :param axes: The list of axes indices which are used to calculate divider of the softmax function. :param name: The optional new name for output node. :return: The new node with softmax operation applied on each element. """ if type(axes) is not set: axes = set(axes) return Softmax(node, AxisSet(axes))
def softmax(node, axes): # type: (Node, Iterable[int]) -> Node """Softmax operation on input tensor.""" if type(axes) is not set: axes = set(axes) return Softmax(node, AxisSet(axes))