class_docstr: Helper for interpolation algirithm.
  New token is sample from model, ground_truth or reward according to lambdas
  
  Args:
      embedding: A callable that takes a vector tensor of `ids` (argmax ids),
          or the `params` argument for `embedding_lookup`. The returned tensor
          will be passed to the decoder input.
      start_tokens: `int32` vector shaped `[batch_size]`, the start tokens.
      end_token: `int32` scalar, the token that marks end of decoding.
      vocab: texar.Vocab, the vocabularies of training set
      reward_metric: 'bleu' or 'rouge', the metric of reward
      ground_truth: the ground truth in training set
      ground_truth_length: the length of ground truth sentences
      lambdas: 'float32' vector shapes [3], according to which
          decide the way of generate the next token in training
class_docstr_tok: ["Helper","for","interpolation","algirithm",".","New","token","is","sample","from","model",",","ground_truth","or","reward","according","to","lambdas","Args",":","embedding",":","A","callable","that","takes","a","vector","tensor","of","`","ids","`","(","argmax","ids",")",",","or","the","`","params","`","argument","for","`","embedding_lookup","`",".","The","returned","tensor","will","be","passed","to","the","decoder","input",".","start_tokens",":","`","int32","`","vector","shaped","`","[","batch_size","]","`",",","the","start","tokens",".","end_token",":","`","int32","`","scalar",",","the","token","that","marks","end","of","decoding",".","vocab",":","texar.Vocab",",","the","vocabularies","of","training","set","reward_metric",":","'bleu","'","or","'rouge","'",",","the","metric","of","reward","ground_truth",":","the","ground","truth","in","training","set","ground_truth_length",":","the","length","of","ground","truth","sentences","lambdas",":","'float32","'","vector","shapes","[","3","]",",","according","to","which","decide","the","way","of","generate","the","next","token","in","training"]
code: def __init__(
      self,
      embedding,
      start_tokens,
      end_token,
      vocab,
      reward_metric,
      ground_truth,
      ground_truth_length,
      lambdas,
  ):
      SampleEmbeddingHelper.__init__(
          self, embedding, start_tokens, end_token
      )
  
      self._vocab = vocab
      self._ground_truth = ground_truth
      self._lambdas = lambdas
      self._ground_truth_length = ground_truth_length
      self._metric = reward_metric
  
file_path: texar/examples/seq2seq_exposure_bias/interpolation_helper.py
imports: import tensorflow
  import numpy
  from tensorflow_probability import distributions
  from tensorflow.contrib.seq2seq import SampleEmbeddingHelper
  from texar.tf.evals.bleu import sentence_bleu
  from rouge import Rouge
label_desc: Use image node_id 1 to create a new InterpolationHelper object from inherited base classes: SampleEmbeddingHelper with example: obj = InterpolationHelper(embedding, start_tokens, end_token, vocab, reward_metric, ground_truth, ground_truth_length, lambdas)