AliY
AliY

Reputation: 557

Print Metrics RNN

I was wondering if it is possible to print the metrics of a RNN, verbose just shows me just shows me a simplified number, for examle "0.0014" but I wanted toprint the full final value. I wanted to print the metrics(mse) final value

Here is a Code for my model:


# creating model using Keras
model10 = Sequential()
model10.add(GRU(units=120, return_sequences=True, input_shape=(1,12),activity_regularizer=regularizers.l2(0.0005)))
model10.add(GRU(units=80, return_sequences=True,dropout=0.1))
model10.add(GRU(units=40, dropout=0.1))
model10.add(Dense(units=5))
model10.add(Dense(units=3))
model10.add(Dense(units=1, activation='relu'))
model10.compile(loss=['mae'], optimizer=Adam(lr=0.0005),metrics=['mse']) 
model10.summary() 


history10=model10.fit(X10_train, y10_train, batch_size=1000,epochs=20,validation_split=0.1, verbose=1, callbacks=[TensorBoardColabCallback(tbc),Early_Stop])

Thank you.

Upvotes: 1

Views: 80

Answers (1)

Kim Tang
Kim Tang

Reputation: 2478

To get your final MSE value, try:

history10.history['mean_squared_error'][-1]

And to get the entire history, so the values for each epoch, try:

history10.history['mean_squared_error']

Upvotes: 2

Related Questions