'Initializer.
Args:
inputs: A (structure) of input tensors.
sequence_length: An int32 vector tensor.
sampling_probability: A 0D `float32` tensor: the probability of sampling
from the outputs instead of reading directly from the inputs.
time_major: Python bool.  Whether the tensors in `inputs` are time major.
If `False` (default), they are assumed to be batch major.
seed: The sampling seed.
next_input_layer: (Optional) An instance of `tf.layers.Layer`, i.e.,
`tf.layers.Dense`.  Optional layer to apply to the RNN output to create
the next input.
auxiliary_inputs: An optional (structure of) auxiliary input tensors with
a shape that matches `inputs` in all but (potentially) the final
dimension. These tensors will be concatenated to the sampled output or
the `inputs` when not sampling for use as the next input.
name: Name scope for any created operations.
Raises:
ValueError: if `sampling_probability` is not a scalar or vector.'

def __init__(self, inputs, sequence_length, sampling_probability, time_major=False, seed=None, next_input_layer=None, auxiliary_inputs=None, name=None):

    with ops.name_scope(name, 'ScheduledOutputTrainingHelper', [inputs, auxiliary_inputs, sampling_probability]):
        self._sampling_probability = ops.convert_to_tensor(sampling_probability, name='sampling_probability')
        if (self._sampling_probability.get_shape().ndims not in (0, 1)):
            raise ValueError(('sampling_probability    must    be    either    a    scalar    or    a    vector.    saw    shape:    %s' % self._sampling_probability.get_shape()))
        if (auxiliary_inputs is None):
            maybe_concatenated_inputs = inputs
        else:
            inputs = ops.convert_to_tensor(inputs, name='inputs')
            auxiliary_inputs = ops.convert_to_tensor(auxiliary_inputs, name='auxiliary_inputs')
            maybe_concatenated_inputs = nest.map_structure((lambda x, y: array_ops.concat((x, y), (-1))), inputs, auxiliary_inputs)
            if (not time_major):
                auxiliary_inputs = nest.map_structure(_transpose_batch_time, auxiliary_inputs)
        self._auxiliary_input_tas = (nest.map_structure(_unstack_ta, auxiliary_inputs) if (auxiliary_inputs is not None) else None)
        self._seed = seed
        if ((next_input_layer is not None) and (not isinstance(next_input_layer, layers_base._Layer))):
            raise TypeError(('next_input_layer    must    be    a    Layer,    received:    %s' % type(next_input_layer)))
        self._next_input_layer = next_input_layer
        super(ScheduledOutputTrainingHelper, self).__init__(inputs=maybe_concatenated_inputs, sequence_length=sequence_length, time_major=time_major, name=name)
