Another viable (and documented) option for grid search with Tensorflow is Ray Tune. It's a scalable framework for hyperparameter tuning, specifically for deep learning/reinforcement learning.
You can try out a fast tutorial here.
It also takes care of Tensorboard logging and efficient search algorithms (ie, HyperOpt integration and HyperBand) in about 10 lines of Python.
import ray from ray import tune def train_tf_model(config, tune_reporter): # 1 new arg for reporting results # ... train here .... # ... train here .... # ... train here .... pass ray.init() tune.run_experiments({ "my_experiment": { "run": train_tf_model, "stop": { "mean_accuracy": 100 }, "config": { "alpha": tune.grid_search([0.2, 0.4, 0.6]), "beta": tune.grid_search([1, 2]), }}}) (Disclaimer: I contribute actively to this project!)