def main(): data = Input(split='train') model = Model(data) for v in tf.global_variables(): print(v) with tf.Session() as sess: sess.run([model.data.initializer, tf.global_variables_initializer()], ) # q, a, s = sess.run([model.ques_enc, model.ans_enc, model.subt_enc]) # print(q.shape, a.shape, s.shape) t, tt = sess.run([model.output, data.gt]) print(t, tt) print(t.shape, tt.shape)
def main(): data = Input(split='train') model = Model(data) for v in tf.global_variables(): print(v) config = tf.ConfigProto() config.gpu_options.allow_growth = True config.graph_options.optimizer_options.global_jit_level = tf.OptimizerOptions.ON_1 with tf.Session(config=config) as sess: sess.run([model.data.initializer, tf.global_variables_initializer()], ) # q, a, s = sess.run([model.ques_enc, model.ans_enc, model.subt_enc]) # print(q.shape, a.shape, s.shape) t, tt = sess.run([model.output, data.gt]) print(t, tt) print(t.shape, tt.shape)
def main(): data = Input(split='train', mode='subt') model = Model(data) for v in tf.global_variables(): print(v) config = tf.ConfigProto(allow_soft_placement=True) config.gpu_options.allow_growth = True # config.graph_options.optimizer_options.global_jit_level = tf.OptimizerOptions.ON_1 with tf.Session(config=config) as sess: sess.run([model.data.initializer, tf.global_variables_initializer()], ) # q, a, s = sess.run([model.ques_enc, model.ans_enc, model.subt_enc]) # print(q.shape, a.shape, s.shape) # a, b, c, d = sess.run(model.tri_word_encodes) # print(a, b, c, d) # print(a.shape, b.shape, c.shape, d.shape) a, b = sess.run([model.ans_vec, model.output]) print(a, b) print(a.shape, b.shape)