But I would like to write weight variables in the resume of the author. Is there any way to do this?
You can get the variable with tf.get_variable(). tf.summary.histogramaccepts a tensor instance, so it would be easier to use Graph.get_tensor_by_name():
n_steps = 2
n_inputs = 3
n_neurons = 5
X = tf.placeholder(dtype=tf.float32, shape=[None, n_steps, n_inputs])
basic_cell = tf.nn.rnn_cell.BasicRNNCell(num_units=n_neurons)
outputs, states = tf.nn.dynamic_rnn(basic_cell, X, dtype=tf.float32)
with tf.variable_scope('rnn', reuse=True):
print(tf.get_variable('basic_rnn_cell/kernel'))
kernel = tf.get_default_graph().get_tensor_by_name('rnn/basic_rnn_cell/kernel:0')
tf.summary.histogram('kernel', kernel)
, tf.nn.rnn_cell.BasicRNNCell tf.contrib.rnn.BasicRNNCell? ?
, , tf.nn.rnn_cell, tf.contrib 1.x.