code: def inflate_to_one_hot(tensor, classes):
      
      one_hot = tf.one_hot(tensor, classes)
      shape = one_hot.get_shape().as_list()
      return tf.reshape(one_hot, shape=[-1, shape[1], shape[2], shape[4]])
docs: Converts a tensor with index form to a one hot tensor.
      :param tensor: A tensor of shape [batch, h, w, 1]
      :param classes: The number of classes that exist. (length of one hot encoding)
      :return: A tensor of shape [batch, h, w, classes].