支持 TPU 的 RunConfig。
继承自:RunConfig
用法
tf.compat.v1.estimator.tpu.RunConfig(
tpu_config=None, evaluation_master=None, master=None, cluster=None, **kwargs
)参数
-
tpu_config指定TPU-specific 配置的 TPUConfig。 -
evaluation_master一个字符串。用于评估的主机地址。如果未设置,则默认为 master。 -
master一个字符串。用于训练的主地址。 -
cluster集群解析器 -
**kwargs关键字配置参数。
抛出
-
ValueError如果集群不是 None 并且提供的 session_config 已经有一个 cluster_def。
属性
-
checkpoint_save_graph_def -
cluster -
cluster_spec -
device_fn返回device_fn。如果 device_fn 不是
None,它将覆盖Estimator中使用的默认设备函数。否则使用默认值。 -
eval_distribute用于评估的可选tf.distribute.Strategy。 -
evaluation_master -
experimental_max_worker_delay_secs -
global_id_in_cluster训练集群中的全局 id。训练集群中的所有全局 id 都是从一个递增的连续整数序列中分配的。第一个id是0。
注意:任务 id(属性字段
task_id)正在跟踪具有相同任务类型的所有节点中的节点索引。例如,给定集群定义如下:cluster = {'chief':['host0:2222'], 'ps':['host1:2222', 'host2:2222'], 'worker':['host3:2222', 'host4:2222', 'host5:2222']}任务类型
worker的节点可以有 id 0, 1, 2。任务类型ps的节点可以有 id, 0, 1。所以,task_id不是唯一的,但对 (task_type,task_id) 可以是唯一的确定集群中的一个节点。全局id,即该字段,是跟踪该节点在集群中所有节点中的索引。它是唯一分配的。例如,对于上面给出的集群规范,全局 id 被分配为:
task_type | task_id | global_id -------------------------------- chief | 0 | 0 worker | 0 | 1 worker | 1 | 2 worker | 2 | 3 ps | 0 | 4 ps | 1 | 5 -
is_chief -
keep_checkpoint_every_n_hours -
keep_checkpoint_max -
log_step_count_steps -
master -
model_dir -
num_ps_replicas -
num_worker_replicas -
protocol返回可选协议值。 -
save_checkpoints_secs -
save_checkpoints_steps -
save_summary_steps -
service返回定义的平台(在TF_CONFIG中)服务字典。 -
session_config -
session_creation_timeout_secs -
task_id -
task_type -
tf_random_seed -
tpu_config -
train_distribute可选的tf.distribute.Strategy用于训练。
相关用法
- Python tf.compat.v1.estimator.tpu.TPUEstimator用法及代码示例
- Python tf.compat.v1.estimator.tpu.experimental.EmbeddingConfigSpec用法及代码示例
- Python tf.compat.v1.estimator.DNNEstimator用法及代码示例
- Python tf.compat.v1.estimator.experimental.KMeans用法及代码示例
- Python tf.compat.v1.estimator.regressor_parse_example_spec用法及代码示例
- Python tf.compat.v1.estimator.BaselineRegressor用法及代码示例
- Python tf.compat.v1.estimator.inputs.numpy_input_fn用法及代码示例
- Python tf.compat.v1.estimator.LinearRegressor用法及代码示例
- Python tf.compat.v1.estimator.BaselineEstimator用法及代码示例
- Python tf.compat.v1.estimator.BaselineClassifier用法及代码示例
- Python tf.compat.v1.estimator.LinearClassifier用法及代码示例
- Python tf.compat.v1.estimator.DNNLinearCombinedRegressor用法及代码示例
- Python tf.compat.v1.estimator.DNNClassifier用法及代码示例
- Python tf.compat.v1.estimator.DNNRegressor用法及代码示例
- Python tf.compat.v1.estimator.DNNLinearCombinedEstimator用法及代码示例
- Python tf.compat.v1.estimator.Estimator用法及代码示例
- Python tf.compat.v1.estimator.LinearEstimator用法及代码示例
- Python tf.compat.v1.estimator.classifier_parse_example_spec用法及代码示例
- Python tf.compat.v1.estimator.DNNLinearCombinedClassifier用法及代码示例
- Python tf.compat.v1.enable_eager_execution用法及代码示例
注:本文由纯净天空筛选整理自tensorflow.org大神的英文原创作品 tf.compat.v1.estimator.tpu.RunConfig。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
