【发布时间】:2016-10-25 08:32:38
【问题描述】:
我有一个带有 kerasRegressor 的 scikit-learn 管道:
estimators = [
('standardize', StandardScaler()),
('mlp', KerasRegressor(build_fn=baseline_model, nb_epoch=5, batch_size=1000, verbose=1))
]
pipeline = Pipeline(estimators)
在训练管道之后,我正在尝试使用 joblib 保存到磁盘...
joblib.dump(pipeline, filename , compress=9)
但我收到一个错误:
RuntimeError: 超出最大递归深度
如何将管道保存到磁盘?
【问题讨论】:
-
你可以看看莳萝。也许它有效pypi.python.org/pypi/dill
-
你应该简单地增加最大递归深度的值:stackoverflow.com/questions/3323001/maximum-recursion-depth
标签: python machine-learning scikit-learn keras joblib