diff --git a/benchmark/pipeline_performance.py b/benchmark/pipeline_performance.py new file mode 100644 index 0000000..1e2125f --- /dev/null +++ b/benchmark/pipeline_performance.py @@ -0,0 +1,15 @@ +from fastestimator.pipeline.static.preprocess import Minmax +from fastestimator.pipeline.pipeline import Pipeline +import tensorflow as tf +import numpy as np + +(x_train, y_train), (x_eval, y_eval) = tf.keras.datasets.mnist.load_data() +x_train = np.expand_dims(x_train, -1) + +pipeline = Pipeline(batch_size=32, + feature_name=["x", "y"], + train_data={"x": x_train, "y": y_train}, + validation_data= {"x": x_eval, "y": y_eval}, + transform_train= [[Minmax()], []]) + +pipeline.benchmark(num_steps=3000, mode="train") \ No newline at end of file