我想知道属性与键" t"one_answers" dtype"
之间的图形的protobuf文件有什么区别例如,对于添加操作员,我们有一个键" t",其类型为值:
name: "conv1/truncated_normal"
op: "Add"
input: "conv1/truncated_normal/mul"
input: "conv1/truncated_normal/mean"
attr {
key: "T"
value {
type: DT_FLOAT
}
}
对于常数,我们通常将" dtype"作为指定类型的关键:
name: "conv1/Const"
op: "Const"
attr {
key: "dtype"
value {
type: DT_FLOAT
}
}
attr {
key: "value"
value {
tensor {
dtype: DT_FLOAT
tensor_shape {
dim {
size: 32
}
}
float_val: 0.10000000149011612
}
}
}
对于截断,我们都有" t"one_answers" dtype"
name: "conv2/truncated_normal/TruncatedNormal"
op: "TruncatedNormal"
input: "conv2/truncated_normal/shape"
attr {
key: "T"
value {
type: DT_INT32
}
}
attr {
key: "dtype"
value {
type: DT_FLOAT
}
}
attr {
key: "seed"
value {
i: 0
}
}
attr {
key: "seed2"
value {
i: 0
}
}
谢谢:)
请注意,对于截断,t和dtype都是" type"属性。 shape
输入参数从" t"中获取其类型,而 output
从" dtype"中获取其类型。名称" t"one_answers" dtype"是任意的,一个OP创建者可以称其为" T1"one_answers" T2",这会更自然。