(logits, mu=1.1)
return np.floor(pixels)
Args:
    logits: [n, 256] float32
    mu    : float32
  Returns:
    pixels: [n] float32
Args:
    logits: [n, 256] float32
    mu    : float32
  Returns:
    pixels: [n] float32
Args : logits : [ n 256 ] float32 mu : float32 Returns : pixels : [ n ] float32
def logits_2_pixel_value(logits, mu=1.1):
  """
  Args:
    logits: [n, 256] float32
    mu    : float32
  Returns:
    pixels: [n] float32
  """
  rebalance_logits = logits * mu
  probs = softmax(rebalance_logits)
  pixel_dict = np.arange(0, 256, dtype=np.float32)
  pixels = np.sum(probs * pixel_dict, axis=1)
  return np.floor(pixels)
def logits_2_pixel_value ( logits , mu = 1.1 ) : rebalance_logits = logits * mu probs = softmax ( rebalance_logits ) pixel_dict = np . arange ( 0 , 256 , dtype = np . float32 ) pixels = np . sum ( probs * pixel_dict , axis = 1 ) return np . floor ( pixels )