def input_fn(ds, batch_size, epochs=1, shuffle=True):
    features = {'x': ds.images}
    return tf.estimator.inputs.numpy_input_fn(x=features, y=ds.labels, batch_size=batch_size, num_epochs=epochs, shuffle=shuffle)
def input_fn(ds, batch_size, epochs=1, shuffle=True):
    features = {'x': ds.images}
    return tf.estimator.inputs.numpy_input_fn(x=features, y=ds.labels, batch_size=batch_size, num_epochs=epochs, shuffle=shuffle)