parameters: (self, shape, seed=0)
docstring: Generate samples of the specified shape.
  
          Args:
            shape (list): 1D `int32`. Shape of the generated samples.
            seed (int): Python integer number.
  
          Returns:
            Variable: A tensor with prepended dimensions shape.The data type is float32.
docstring_summary: Generate samples of the specified shape.
docstring_tokens: Generate samples of the specified shape .
function: def sample(self, shape, seed=0):
          """Generate samples of the specified shape.
  
          Args:
            shape (list): 1D `int32`. Shape of the generated samples.
            seed (int): Python integer number.
  
          Returns:
            Variable: A tensor with prepended dimensions shape.The data type is float32.
  
          """
          check_type(shape, 'shape', (list), 'sample')
          check_type(seed, 'seed', (int), 'sample')
  
          batch_shape = list((self.low + self.high).shape)
          if self.batch_size_unknown:
              output_shape = shape + batch_shape
              zero_tmp = tensor.fill_constant_batch_size_like(
                  self.low + self.high, batch_shape + shape, self.low.dtype, 0.)
              uniform_random_tmp = nn.uniform_random_batch_size_like(
                  zero_tmp, zero_tmp.shape, min=0., max=1., seed=seed)
              output = uniform_random_tmp * (zero_tmp + self.high - self.low
                                             ) + self.low
              return nn.reshape(output, output_shape)
          else:
              output_shape = shape + batch_shape
              output = nn.uniform_random(
                  output_shape, seed=seed) * (tensor.zeros(
                      output_shape, dtype=self.low.dtype) +
                                              (self.high - self.low)) + self.low
              if self.all_arg_is_float:
                  return nn.reshape(output, shape)
              else:
                  return output
function_tokens: def sample ( self , shape , seed = 0 ) : check_type ( shape , 'shape' , ( list ) , 'sample' ) check_type ( seed , 'seed' , ( int ) , 'sample' ) batch_shape = list ( ( self . low + self . high ) . shape ) if self . batch_size_unknown : output_shape = shape + batch_shape zero_tmp = tensor . fill_constant_batch_size_like ( self . low + self . high , batch_shape + shape , self . low . dtype , 0. ) uniform_random_tmp = nn . uniform_random_batch_size_like ( zero_tmp , zero_tmp . shape , min = 0. , max = 1. , seed = seed ) output = uniform_random_tmp * ( zero_tmp + self . high - self . low ) + self . low return nn . reshape ( output , output_shape ) else : output_shape = shape + batch_shape output = nn . uniform_random ( output_shape , seed = seed ) * ( tensor . zeros ( output_shape , dtype = self . low . dtype ) + ( self . high - self . low ) ) + self . low if self . all_arg_is_float : return nn . reshape ( output , shape ) else : return output