while input_var not in ['yes', 'no']: input_var = input("We found model files. Do you want to load it and continue training [yes/no]?") if input_var == 'yes': load = True if load: saver.restore(sess, './weights/' + model_path + '.ckpt') distances = [] test_labels = [] for i in range(1000): if siamese.batch_size > 1: x1_test, x2_test, sim_labels, x1_label, x2_label = dataset.get_batch(training=siamese.training, optical_flow=siamese.optical_flow, augment=False, batch_size=siamese.batch_size, seq_len=siamese.seq_len) else: if i % 2: pair = dataset.get_positive_sequence_pair(training=siamese.training, dense_optical_flow=siamese.optical_flow, augment=False, seq_len=siamese.seq_len) else: pair = dataset.get_negative_sequence_pair(training=siamese.training, dense_optical_flow=siamese.optical_flow, augment=False, seq_len=siamese.seq_len)
) if input_var == 'yes': load = True if load: saver.restore(sess, './weights/' + model_path + '.ckpt') losses_window = [] avg_loss = 0 for step in range(1000000): if siamese.batch_size > 1: batch_x1, batch_x2, batch_y, x1_label, x2_label = dataset.get_batch( training=siamese.training, optical_flow=siamese.optical_flow, augment=True, batch_size=siamese.batch_size, seq_len=siamese.seq_len) else: if step % 2 == 0: pair = dataset.get_positive_sequence_pair( training=siamese.training, dense_optical_flow=siamese.optical_flow, augment=True, seq_len=siamese.seq_len) else: pair = dataset.get_negative_sequence_pair( training=siamese.training, dense_optical_flow=siamese.optical_flow, augment=True,