@ tf.name_scope(name, default_name=None, values=None)
定义命名空间(或定义域),可以嵌套使用,用于管理该命名空间下的东西,并用于session graph的可视化
@ Tensorflow 中的 op:
Ops are say the core of tensorflow.
TensorFlow is a programming system in which you represent computations as graphs. Nodes in the graph are called ops (short for operations). An op takes zero or more Tensors, performs some computation, and produces zero or more Tensors.
In [74]: with tf.Session() as sess:
...: zer = tf.zeros(shape=(32, 32))
...: print(zer.op)
...:
name: "zeros_11"
op: "Const"
attr {
key: "dtype"
value {
type: DT_FLOAT
}
}
attr {
key: "value"
value {
tensor {
dtype: DT_FLOAT
tensor_shape {
dim {
size: 32
}
dim {
size: 32
}
}
float_val: 0.0
}
}
}
zer.op in your example prints out the features of Tensor zer in that json-like format
@ Summaries
Summaries provided a way to export condensed information about the model, which is then accessible in tools such as