def input_fn(is_training, data_dir, batch_size, *args, **kwargs):
    'Returns dataset filled with random data.'
    (inputs, labels) = get_synth_data(height=height, width=width, num_channels=num_channels, num_classes=num_classes, dtype=dtype)
    labels = tf.cast(labels, dtype=tf.float32)
    data = tf.data.Dataset.from_tensors((inputs, labels)).repeat()
    data = data.batch(batch_size, drop_remainder=drop_remainder)
    data = data.prefetch(buffer_size=tf.data.experimental.AUTOTUNE)
    return data
Returns dataset filled with random data.
def input_fn(is_training, data_dir, batch_size, *args, **kwargs):
    
    (inputs, labels) = get_synth_data(height=height, width=width, num_channels=num_channels, num_classes=num_classes, dtype=dtype)
    labels = tf.cast(labels, dtype=tf.float32)
    data = tf.data.Dataset.from_tensors((inputs, labels)).repeat()
    data = data.batch(batch_size, drop_remainder=drop_remainder)
    data = data.prefetch(buffer_size=tf.data.experimental.AUTOTUNE)
    return data