從計算中的邏輯核心映射到物理 TPU 拓撲。
用法
tf.tpu.experimental.DeviceAssignment(
    topology:tf.tpu.experimental.Topology,
    core_assignment:np.ndarray
)參數
- 
topology說明物理 TPU 拓撲的Topology對象。
- 
core_assignment邏輯到物理核心映射,表示為 rank 3 numpy 數組。有關詳細信息,請參閱core_assignment屬性的說明。
拋出
- 
ValueError如果topology不是Topology對象。
- 
ValueError如果core_assignment不是 3 級 numpy 數組。
屬性
- 
core_assignment邏輯到物理核心映射。
- 
num_cores_per_replica每個副本的核心數。
- 
num_replicas計算的副本數。
- 
topology說明 TPU 拓撲的Topology。
更喜歡使用 DeviceAssignment.build() 幫助器來構造 DeviceAssignment ;如果靈活性不如直接構建DeviceAssignment,那麽它會更容易。
相關用法
- Python tf.tpu.experimental.embedding.FeatureConfig用法及代碼示例
- Python tf.tpu.experimental.embedding.FTRL用法及代碼示例
- Python tf.tpu.experimental.embedding.TPUEmbedding.apply_gradients用法及代碼示例
- Python tf.tpu.experimental.embedding.TPUEmbedding用法及代碼示例
- Python tf.tpu.experimental.embedding.TPUEmbedding.dequeue用法及代碼示例
- Python tf.tpu.experimental.embedding.SGD用法及代碼示例
- Python tf.tpu.experimental.embedding.TableConfig用法及代碼示例
- Python tf.tpu.experimental.embedding.Adam用法及代碼示例
- Python tf.tpu.experimental.embedding.Adagrad用法及代碼示例
- Python tf.tpu.experimental.embedding.serving_embedding_lookup用法及代碼示例
- Python tf.tpu.experimental.embedding.TPUEmbedding.enqueue用法及代碼示例
- Python tf.types.experimental.GenericFunction.get_concrete_function用法及代碼示例
- Python tf.train.Coordinator.stop_on_exception用法及代碼示例
- Python tf.train.ExponentialMovingAverage用法及代碼示例
- Python tf.train.Checkpoint.restore用法及代碼示例
- Python tf.test.is_built_with_rocm用法及代碼示例
- Python tf.train.Checkpoint.read用法及代碼示例
注:本文由純淨天空篩選整理自tensorflow.org大神的英文原創作品 tf.tpu.experimental.DeviceAssignment。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
