Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %%time
- seed = 7
- numpy.random.seed(seed)
- batch_size = 128
- epochs = 10
- model_CV = KerasClassifier(build_fn=create_model, epochs=epochs,
- batch_size=batch_size, verbose=1)
- # define the grid search parameters
- init_mode = ['uniform', 'lecun_uniform', 'normal', 'zero',
- 'glorot_normal', 'glorot_uniform', 'he_normal', 'he_uniform']
- param_grid = dict(init_mode=init_mode)
- grid = GridSearchCV(estimator=model_CV, param_grid=param_grid, n_jobs=-1, cv=3)
- grid_result = grid.fit(x_train, y_train)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement