我正在使用Tensorflow 2.0a和tf.debugging.set_log_device_placement(True)
记录每个操作的位置。但是某些操作非常隐晦..对我来说,重要的是要了解这些操作对应的内容,因为它们在CPU上运行,可能会减慢我的训练速度。
尤其是:VarIsInitializedOp, AssignVariableOp, ReadVariableOp
这些操作与我可以在代码中标记的特定 tf 调用之间是否存在明确的映射?
Executing op VarHandleOp in device /job:localhost/replica:0/task:0/device:CPU:0
2019-05-30 16:20:56.082274: I tensorflow/core/common_runtime/eager/execute.cc:394] Executing op VarHandleOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op VarIsInitializedOp in device /job:localhost/replica:0/task:0/device:CPU:0
2019-05-30 16:20:56.082418: I tensorflow/core/common_runtime/eager/execute.cc:394] Executing op VarIsInitializedOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
2019-05-30 16:20:56.084034: I tensorflow/core/common_runtime/eager/execute.cc:394] Executing op AssignVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op ReadVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
2019-05-30 16:20:56.258670: I tensorflow/core/common_runtime/eager/execute.cc:394] Executing op ReadVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0