11 November 2018 4 2K Report

In tensorflow, I have a two-stream neural network and I want to share the same weights in first two layers. For example,

x1_conv_w1 = tf.get_variable("x1_conv_w1", [5,5,4,32], dtype=tf.float32, initializer=tf.contrib.layers.xavier_initializer_conv2d()). I want to use this convolutional weights in the first layer of two individual networks. Could I directly use it or I need to define another variable and give it reuse setting?

Similar questions and discussions