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

后端 未结 5 945
一个人的身影
一个人的身影 2021-01-29 22:32

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 = Bat         


        
5条回答
  •  走了就别回头了
    2021-01-29 23:35

    verbose: Integer. 0, 1, or 2. Verbosity mode.

    Verbose=0 (silent)

    Verbose=1 (progress bar)

    Train on 186219 samples, validate on 20691 samples
    Epoch 1/2
    186219/186219 [==============================] - 85s 455us/step - loss: 0.5815 - acc: 
    0.7728 - val_loss: 0.4917 - val_acc: 0.8029
    Train on 186219 samples, validate on 20691 samples
    Epoch 2/2
    186219/186219 [==============================] - 84s 451us/step - loss: 0.4921 - acc: 
    0.8071 - val_loss: 0.4617 - val_acc: 0.8168
    

    Verbose=2 (one line per epoch)

    Train on 186219 samples, validate on 20691 samples
    Epoch 1/1
     - 88s - loss: 0.5746 - acc: 0.7753 - val_loss: 0.4816 - val_acc: 0.8075
    Train on 186219 samples, validate on 20691 samples
    Epoch 1/1
     - 88s - loss: 0.4880 - acc: 0.8076 - val_loss: 0.5199 - val_acc: 0.8046
    

提交回复
热议问题