class_docstr: Functions related to (negative) Hamming Distance Sampling.
code: def _softmax(self, x):
      softmax = np.exp(x) / sum(np.exp(x))
      return softmax
  
imports: import random
  import numpy
  from onmt.constants import DefaultTokens
  from onmt.transforms import register_transform
  from .transform import Transform, ObservableStats
label_desc: Use image node_id 1 for calling the HammingDistanceSampling obj's underlying member method code with example usage: obj._softmax(x) and returns: softmax