I am using tf.python.ops.rnn_cell.GRUCell
output, state = tf.nn.dynamic_rnn(
GRUCell(HID_DIM),
sequence,
dtype=tf.float32,
sequence_length=length(sequence)
)
How do I get the weights of this GRUCell. I need to see them for debugging.
Recurrent networks also share parameters across each layer of the network. In feedforward networks, there are different weights across each node. Whereas RNN shares the same weights within each layer of the network and during gradient descent, the weights and basis are adjusted individually to reduce the loss.
The parallel processing capabilities of GPUs can accelerate both the training and inference processes of RNNs.
CNN is considered to be more powerful than RNN. RNN includes less feature compatibility when compared to CNN. This network takes fixed size inputs and generates fixed size outputs. RNN can handle arbitrary input/output lengths.
The values of all the variables in the current session can be printed using:
with tf.Session() as sess:
variables_names =[v.name for v in tf.trainable_variables()]
values = sess.run(variables_names)
for k,v in zip(variables_names, values):
print(k, v)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With