-1

我已经执行了 Keras 调谐器,在控制台上看到了输出,然后关闭了控制台。

现在,我想再次查看输出。

我可以从哪里看到它,以及如何看到它?

4

1 回答 1

1

从一开始就记录控制台输出

典型的命令是:

python mytuner.py | tee -a console.log

-a将以追加模式写入。没有-a将覆盖现有的 console.log 文件。

检查现有日志

如果您可以访问调谐器搜索,请检查回调中的内容。也许CSVLogger在那里定义。检查 csv 文件的内容。可能不是控制台中的完整日志。

tuner.search(
    train_features,
    train_labels,
    epochs=100,
    batch_size=BATCH_SIZE,
    validation_data=(val_features, val_labels),
    callbacks=[tf.keras.callbacks.CSVLogger('e:/ktuner/mylog.csv', separator=",", append=False)],
)

通过张量板检查日志

如果您可以访问调谐器搜索,请检查 tensorboard 回调。

tuner.search(
    train_features,
    train_labels,
    epochs=100,
    batch_size=BATCH_SIZE,
    validation_data=(val_features, val_labels),
    callbacks=[keras.callbacks.TensorBoard("e:/ktuner/logs")]
)

安装 tensorboard 然后发送命令:

tensorboard --logdir e:/ktuner/logs

In the tensorboard GUI there is an option to show download link. You can download csv or json file from different metric monitors. The logs here may not be the same as in the console logs.

enter image description here

于 2021-11-24T04:00:29.907 回答