首页 > 解决方案 > 最佳模型的试用 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

标签: pythonregressiongoogle-colaboratoryauto-keras

解决方案


推荐阅读