assert model_ops.is_training()
self.require_attributes(["loss", "global_step", "updates"])
train_op = self.get_training_op()
no_op = tf.no_op()
tf.train.write_graph(
tf.get_default_graph().as_graph_def(), self.logdir, "train.pbtxt")
with self._get_shared_session() as sess:
sess.run(tf.initialize_all_variables())
After Change
saver.save(sess, self._save_path, global_step=0)
for epoch in range(nb_epoch):
//////////////////// DEBUG
y_bs, y_preds = [], []
//////////////////// DEBUG
for (X_b, y_b, w_b, ids_b) in dataset.iterbatches(batch_size):
// Run training op and compute summaries.