parameters: (self, params)
return_statement: return dataset
docstring: Input function which provides null (black) images.
docstring_summary: Input function which provides null (black) images.
docstring_tokens: Input function which provides null ( black ) images .
function: def input_fn_null(self, params):
      """Input function which provides null (black) images."""
      batch_size = params['batch_size']
      dataset = tf.data.Dataset.range(1).repeat().map(self._get_null_input)
      dataset = dataset.prefetch(batch_size)
  
      dataset = dataset.batch(batch_size, drop_remainder=True)
      if self.transpose_input:
        dataset = dataset.map(
            lambda images, labels: (tf.transpose(images, [1, 2, 3, 0]), labels),
            num_parallel_calls=8)
  
      dataset = dataset.map(functools.partial(self.set_shapes, batch_size))
  
      dataset = dataset.prefetch(32)     # Prefetch overlaps in-feed with training
      tf.logging.info('Input dataset: %s', str(dataset))
      return dataset
function_tokens: def input_fn_null ( self , params ) : batch_size = params [ 'batch_size' ] dataset = tf . data . Dataset . range ( 1 ) . repeat ( ) . map ( self . _get_null_input ) dataset = dataset . prefetch ( batch_size ) dataset = dataset . batch ( batch_size , drop_remainder = True ) if self . transpose_input : dataset = dataset . map ( lambda images , labels : ( tf . transpose ( images , [ 1 , 2 , 3 , 0 ] ) , labels ) , num_parallel_calls = 8 ) dataset = dataset . map ( functools . partial ( self . set_shapes , batch_size ) ) dataset = dataset . prefetch ( 32 ) # Prefetch overlaps in-feed with training tf . logging . info ( 'Input dataset: %s' , str ( dataset ) ) return dataset