TensorFlow Machine Learning Projects
上QQ阅读APP看书,第一时间看更新

Simple placement

TensorFlow follows the following rules for placing the variables on devices:

If the graph was previously run, 
then the node is left on the device where it was placed earlier
Else If the tf.device() block is used,
then the node is placed on the specified device
Else If the GPU is present
then the node is placed on the first available GPU
Else If the GPU is not present
then the node is placed on the CPU