Skip to content
Advertisement

What is the use of verbose in Keras while validating the model?

I’m running the LSTM model for the first time. Here is my model:

opt = Adam(0.002)
inp = Input(...)
print(inp)
x = Embedding(....)(inp)
x = LSTM(...)(x)
x = BatchNormalization()(x)
pred = Dense(5,activation='softmax')(x)

model = Model(inp,pred)
model.compile(....)

idx = np.random.permutation(X_train.shape[0])
model.fit(X_train[idx], y_train[idx], nb_epoch=1, batch_size=128, verbose=1)

What is the use of verbose while training the model?

Advertisement

Answer

Check documentation for model.fit here.

By setting verbose 0, 1 or 2 you just say how do you want to ‘see’ the training progress for each epoch.

verbose=0 will show you nothing (silent)

verbose=1 will show you an animated progress bar like this:

progres_bar

verbose=2 will just mention the number of epoch like this:

enter image description here

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement