class_docstr: Allows to create stack layers for a given network.
class_docstr_tok: ["Allows","to","create","stack","layers","for","a","given","network","."]
docstr: Creates a new softmax layer
  :param name: name to set for the layer
  :param axis:
  :param input_layer_name: name of the input layer for this layer. If None, it will take the last added layer of
  the network.
docstr_tok: ["Creates","a","new","softmax","layer",":","param","name",":","name","to","set","for","the","layer",":","param","axis",":",":","param","input_layer_name",":","name","of","the","input","layer","for","this","layer",".","If","None",",","it","will","take","the","last","added","layer","of","the","network","."]
code: def new_softmax(self, name, axis, input_layer_name: str = None):
      """
      Creates a new softmax layer
      :param name: name to set for the layer
      :param axis:
      :param input_layer_name: name of the input layer for this layer. If None, it will take the last added layer of
      the network.
      """
      input_layer = self.__network.get_layer(input_layer_name)
  
      if LooseVersion(tf.__version__) < LooseVersion("1.5.0"):
          max_axis = tf.reduce_max(
              input_tensor=input_layer, axis=axis, keepdims=True
          )
          target_exp = tf.exp(input_layer - max_axis)
          normalize = tf.reduce_sum(
              input_tensor=target_exp, axis=axis, keepdims=True
          )
      else:
          max_axis = tf.reduce_max(
              input_tensor=input_layer, axis=axis, keepdims=True
          )
          target_exp = tf.exp(input_layer - max_axis)
          normalize = tf.reduce_sum(
              input_tensor=target_exp, axis=axis, keepdims=True
          )
  
      softmax = tf.math.divide(target_exp, normalize, name)
  
      self.__network.add_layer(name, layer_output=softmax)
  
file_path: mtcnn/mtcnn/layer_factory.py
imports: import tensorflow
  from distutils.version import LooseVersion
label_desc: Use image node_id 11 for calling the LayerFactory obj's underlying member method code with example usage: obj.new_softmax(name, axis, input_layer_name) without return types