class_docstr: LogSoftmax activation function
  :math:`\\varphi(\\mathbf{x})_j =
  \\e^{(\mathbf{x}_j - log{\sum_{k=1}^K e^{\mathbf{x}_k})}}
  where :math:`K` is the total number of neurons in the layer. This
  activation function gets applied row-wise.
class_docstr_tok: ["LogSoftmax","activation","function",":","math",":","`","\\\\varphi","(","\\\\mathbf","{","x","}",")","_j","=","\\\\e^","{","(","\\mathbf","{","x","}","_j","-","log","{","\\sum_","{","k=1","}","^K","e^","{","\\mathbf","{","x","}","_k","}",")","}","}","where",":","math",":","`","K","`","is","the","total","number","of","neurons","in","the","layer",".","This","activation","function","gets","applied","row-wise","."]
code: def __init__(self, axis):
      if axis is not None and not isinstance(axis, int):
          raise TypeError("axis must be an integer or `None`")
      self.axis = axis
  
imports: from textwrap import dedent
  import numpy
  import scipy
  from pytensor.graph.basic import Apply
  from pytensor.graph.replace import _vectorize_node
  from pytensor.link.c.op import COp
  from pytensor.tensor.basic import as_tensor_variable
  from pytensor.tensor.elemwise import get_normalized_batch_axes
  from pytensor.tensor.math import gamma, gammaln, neg, sum
label_desc: Use image node_id 1 to create a new LogSoftmax object from inherited base classes: COp with example: obj = LogSoftmax(axis)