张量板中的两个优化器(张量流图)

时间:2019-03-29 06:40:14

标签: python tensorflow tensorboard

在tensorboard中,我在图形中看到两个adam(优化器)节点,而我只在模块上调用一次grad(使用优化器)。
我在其他节点上没有看到这种行为,也无法理解为什么有两个adam节点,或者在哪里使用了另一个。
但是,该过程按预期进行。

def sep_conv_ker(inputs):
    input_shape = inputs.get_shape().as_list()
    inputs_flatten = tf.reshape(inputs,[-1,1,input_shape[-2], input_shape[-1]])
    filter = tf.get_variable("filter",shape=[1, input_shape[-2], input_shape[-1], 1],initializer=tf.initializers.truncated_normal)
    sep_conv2d = tf.nn.depthwise_conv2d(inputs_flatten, filter, [1, 1, 1, 1], "VALID",
                                        name="sep_conv_cut_point")
    cut_points = tf.reshape(sep_conv2d,[input_shape[0],input_shape[1], sep_conv2d.shape[-1]])

    return cut_points

并在张量板上显示图形 enter image description here

0 个答案:

没有答案
相关问题