code: def softmax(w):
      maxes = np.amax(w, axis=-1, keepdims=True)
      e = np.exp(w - maxes)
      dist = e / np.sum(e, axis=-1, keepdims=True)
      return dist
  
file_path: pytorch/caffe2/contrib/warpctc/ctc_ops_test.py
imports: import numpy
  from caffe2.proto import caffe2_pb2
  from caffe2.python import core, workspace, dyndep, test_util
label_desc: Use image node_id 1 for calling a global function with example usage: softmax(w) and returns: dist