// And then after everything is built, start the training loop.
for self.step in range(max_steps):
start_time = time.time()
feed_dict, loss_value = self.run_training_steps(data_sets)
duration = time.time() - start_time
// Write the summaries and print an overview fairly often.
if self.step % steps_between_checks == 0:
self.write_summary(duration, feed_dict, loss_value, self.step)
After Change
def train(self, data_sets, max_steps, precision=None, steps_between_checks=100):
assert precision is None or 0. < precision < 1.
self.session = self.initialize_session()
// And then after everything is built, start the training loop.