2024-04-26 14:25:40 发布
网友
使用Python Sagemaker SDK,可以使用TensorFlow启动培训作业,代码如下:
import sagemaker from sagemaker.tensorflow import TensorFlow sess = sagemaker.Session() tf_estimator = TensorFlow(...) tf_estimator.fit(...)
是否可以在此脚本中指定培训的最大运行时间
让我对@Franco的答案加上一点更正
sagemaker.estimator.EstimatorBase的参数名为max_run=86400以分配最大运行时间
sagemaker.estimator.EstimatorBase
max_run=86400
由于AWS支持,找到了答案:
TensorFlow估计器有一个基类sagemaker.estimator.Framework,它又有一个基类sagemaker.estimator.EstimatorBase,它接受参数train_max_run,它接受以秒为单位的值,默认为86,400或24hs
sagemaker.estimator.Framework
train_max_run
86,400
24hs
因此TensorFlow估计器的初始化将传递最大训练运行时间的自定义值,如下所示:
TensorFlow
MAX_TRAINING_TIME = 99999 tf_estimator = TensorFlow(..., train_max_run=MAX_TRAINING_TIME)
让我对@Franco的答案加上一点更正
sagemaker.estimator.EstimatorBase
的参数名为max_run=86400
以分配最大运行时间由于AWS支持,找到了答案:
TensorFlow估计器有一个基类
sagemaker.estimator.Framework
,它又有一个基类sagemaker.estimator.EstimatorBase
,它接受参数train_max_run
,它接受以秒为单位的值,默认为86,400
或24hs
因此
TensorFlow
估计器的初始化将传递最大训练运行时间的自定义值,如下所示:相关问题 更多 >
编程相关推荐