支持 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。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
