指定config参数,使用ConfigProto协议缓冲
config=tf.ConfigProto(log_device_placement=True)
#确保录入了运算分配到的GPU和CPU设备
config=tf.ConfigProto(allow_soft_placement=True)
#设备使用软约束
指定config参数,使用ConfigProto协议缓冲
config=tf.ConfigProto(log_device_placement=True)
#确保录入了运算分配到的GPU和CPU设备
config=tf.ConfigProto(allow_soft_placement=True)
#设备使用软约束