googlecolab / colabtools

Python libraries for Google Colaboratory
Apache License 2.0
2.18k stars 711 forks source link

When I run a network with two outputs, Colab returns only one metric in the history. #4831

Open AkbarzadehLari opened 3 weeks ago

AkbarzadehLari commented 3 weeks ago

In this week, 1- When I run a network with two outputs, Colab returns only one metric, in the history. for example: from keras import layers from keras import Model import numpy as np

inp = layers.Input((1,)) out1 = layers.Dense(2, name="output1")(inp) out2 = layers.Dense(3, name="output2")(inp)

model = Model(inp, [out1, out2]) model.compile(loss='mse', optimizer='adam')

x = np.random.rand(2, 1) y1 = np.random.rand(2, 2) y2 = np.random.rand(2, 3) history = model.fit(x, [y1,y2], epochs=5) print(history.history)

the output is: {'loss': [1.1894587278366089, 1.1858896017074585, 1.1823277473449707, 1.1787735223770142, 1.1752269268035889]} Previously, the losses of each output were reported by Colab in the history.

2- variables are not shown in the Variable Inspector "{x}"

cperry-goog commented 2 weeks ago

Do you have a minimal reproducible notebook I can use to investigate? I don't follow what issue you're encountering from just the text paste.