diff --git a/tutorials/tmva/keras/GenerateModel.py b/tutorials/tmva/keras/GenerateModel.py index 1c3a292696f3081a4dbae8e45ae99a520b7770fc..219d3ebbe0ac13c10ae88424f17aeb758c6b71dd 100755 --- a/tutorials/tmva/keras/GenerateModel.py +++ b/tutorials/tmva/keras/GenerateModel.py @@ -14,6 +14,7 @@ from keras.models import Sequential from keras.layers.core import Dense, Activation from keras.regularizers import l2 from keras.optimizers import SGD +from keras.utils import plot_model # Setup the model here num_input_nodes = 4 @@ -57,7 +58,6 @@ model.summary() # Visualize model as graph try: - from keras.utils.visualize_util import plot - plot(model, to_file='model.png', show_shapes=True) + plot_model(model, to_file='model.png', show_shapes=True) except: print('[INFO] Failed to make model plot')