class_docstr: A training helper that adds scheduled sampling.
  
  Returns -1s for sample_ids where no sampling took place; valid sample id
  values elsewhere.
class_docstr_tok: ["A","training","helper","that","adds","scheduled","sampling",".","Returns","-1s","for","sample_ids","where","no","sampling","took","place",";","valid","sample","id","values","elsewhere","."]
code: def sample(self, time, outputs, state, name=None):
      with ops.name_scope(
          name,
          "ScheduledEmbeddingTrainingHelperSample",
          [time, outputs, state],
      ):
          # Return -1s where we did not sample, and sample_ids elsewhere
          select_sample_noise = random_ops.random_uniform(
              [self.batch_size], seed=self._scheduling_seed
          )
          select_sample = (
              self._sampling_probability > select_sample_noise
          )
          sample_id_sampler = categorical.Categorical(logits=outputs)
          return array_ops.where(
              select_sample,
              sample_id_sampler.sample(seed=self._seed),
              array_ops.tile([-1], [self.batch_size]),
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import six
  from tensorflow.contrib.distributions.python.ops import bernoulli
  from tensorflow.contrib.distributions.python.ops import categorical
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.layers import base
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import embedding_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import tensor_array_ops
  from tensorflow.python.util import nest
  from seq2seq.contrib.seq2seq import decoder
label_desc: Use image node_id 3 for calling the ScheduledEmbeddingTrainingHelper obj's underlying member method code with example usage: obj.sample(time, outputs, state, name) and returns: array_ops