我已经执行了 Keras 调谐器,在控制台上看到了输出,然后关闭了控制台。
现在,我想再次查看输出。
我可以从哪里看到它,以及如何看到它?
典型的命令是:
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.