checkpoint = tf.train.get_checkpoint_state(MODEL_DIR) if checkpoint and checkpoint.model_checkpoint_path: saver.restore(session, checkpoint.model_checkpoint_path) print("Loaded checkpoint: {}".format(checkpoint.model_checkpoint_path)) else: print("Unable to load checkpoint") counter = 0 print(len(DataSet.TRAIN_DATASET.images)) saver.save(session, os.path.join(MODEL_DIR, "network"), global_step=counter) for epoch in range(3): print(epoch) for images, labels in DataSet.iter_batches(50): counter += 1 if counter % 100 == 0: print(counter) acc, summ = session.run([model.accuracy, summary], feed_dict = { model.input_var: images, model.corr_labels: labels, model.keep_prob: 1.0 }) writer.add_summary(summ, counter) print("iteration {}, training accuracy {}".format(counter, acc)) session.run([model.train], feed_dict = { model.input_var: images,