Skip to content Skip to sidebar Skip to footer

How Can I Complete Following Gru Based Rnn Written In Tensorflow?

So far I have written following code: import pickle import numpy as np import pandas as pd import tensorflow as tf # load pickled objects (x and y) x_input, y_actual = pickle.load

Solution 1:

tf.initialize_all_variables() gets the "current" set of variables from the graph. Since you are creating softmax_w and softmax_b after your call to tf.initialize_all_variables(), they are not in the list that tf.initialize_all_variables() consults, and hence not initialized when you run sess.run(init_op). The following should work :

softmax_w = tf.get_variable("softmax_w", [hidden_size, 1], )
softmax_b = tf.get_variable("softmax_b", [1])

init_op = tf.initialize_all_variables()

Post a Comment for "How Can I Complete Following Gru Based Rnn Written In Tensorflow?"