python - 最佳模型的试用 ID
问题描述
我正在使用 Autokeras 寻找最佳回归模型,我需要绘制最佳模型的学习曲线。但是,我找不到最佳模型的试用 ID。这是我的代码的一部分:
#path for saving the logs
import datetime
%load_ext tensorboard
path = "logs/fit/" + datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
tensorboard_callback= tf.keras.callbacks.TensorBoard(log_dir=path)
# Creating Keras Search Type
regressor = ak.StructuredDataRegressor(
output_dim=2,
loss="mean_squared_error",
metrics=["mae","mean_squared_error"],
project_name="structured_data_regressor",
max_trials=3,
directory=None,
objective="val_mean_squared_error",
tuner=None,
overwrite=False,
seed=100,
)
#Fitting ANN to Training Set - Validation Data Provide --> Validation Split = 0.1111
history = regressor.fit(x = X_train, y = y_train, epochs= 5, callbacks=[tensorboard_callback], validation_split=0.2)
#Learning Curves
%tensorboard --logdir logs/fit
解决方案
推荐阅读
- python - 如何在 python 3 中添加方法以在我的类 obj 中使用“in”?
- python - AWS S3 通知整合
- python - 情节:如何按两个变量的比率对情节进行排序?
- xml - 提取标签 XML 没有它的值 xml Shell 脚本
- angular - 如何仅使用 Angular Material 使我的应用程序响应?
- javascript - 使用 document.querySelector 应用样式
- javascript - 使用 MySQL 在 Node.js 中实现 async/await 和 Promise
- ruby-on-rails - 引用两个模型的模型的 Rails 迁移
- ajax - Ajax post call 似乎工作,仍然抛出错误?
- javascript - 如何使用 javascript 修复 div 元素内的鼠标指针?