def input_data(shape=None, placeholder=None, dtype=tf.float32, data_preprocessing=None, data_augmentation=None, name='InputData'):
 if (placeholder is None):
  if (shape is None):
   raise Exception('Either a `shape` or `placeholder` argument is required to consruct an input layer.')
  if ((len(shape) > 1) and (shape[0] is not None)):
   shape = list(shape)
   shape = ([None] + shape)
  with tf.name_scope(name):
   placeholder = tf.placeholder(shape=shape, dtype=dtype, name='X')
 tf.add_to_collection(tf.GraphKeys.INPUTS, placeholder)
 tf.add_to_collection(((tf.GraphKeys.LAYER_TENSOR + '/') + name), placeholder)
 tf.add_to_collection(tf.GraphKeys.DATA_PREP, data_preprocessing)
 tf.add_to_collection(tf.GraphKeys.DATA_AUG, data_augmentation)
 return placeholder

def input_data ( shape = None , placeholder = None , dtype = tf . float32 , data_preprocessing = None , data_augmentation = None , name = 'InputData' ) : if ( placeholder is None ) : if ( shape is None ) : raise Exception ( 'Either a `shape` or `placeholder` argument is required to consruct an input layer.' ) if ( ( len ( shape ) > 1 ) and ( shape [ 0 ] is not None ) ) : shape = list ( shape ) shape = ( [ None ] + shape ) with tf . name_scope ( name ) : placeholder = tf . placeholder ( shape = shape , dtype = dtype , name = 'X' ) tf . add_to_collection ( tf . GraphKeys . INPUTS , placeholder ) tf . add_to_collection ( ( ( tf . GraphKeys . LAYER_TENSOR + '/' ) + name ) , placeholder ) tf . add_to_collection ( tf . GraphKeys . DATA_PREP , data_preprocessing ) tf . add_to_collection ( tf . GraphKeys . DATA_AUG , data_augmentation ) return placeholder
input data .