Commit e4ee8a3b authored by Jonas Müller's avatar Jonas Müller

output changes

parent 447ca5ee
......@@ -104,10 +104,12 @@ def get_validation_loss(data_gen_val, epoch_length, model_rpn, model_classifier,
iter_num += 1
'''
progbar.update(iter_num,
[('val_rpn_cls', np.mean(losses[:iter_num, 0])), ('val_rpn_regr', np.mean(losses[:iter_num, 1])),
('val_detector_cls', np.mean(losses[:iter_num, 2])), ('val_detector_regr', np.mean(losses[:iter_num, 3]))]
)
'''
#print('end try before if, iter num : {} , epoch num {}'.format(iter_num, epoch_num))
if iter_num == epoch_length or iter_num == epoch_length-1:
loss_rpn_cls = np.mean(losses[:, 0])
......
......@@ -69,7 +69,7 @@ parser.add_option("--input_weight_path", dest="input_weight_path", help="Input p
parser.add_option("-b", "--bbox_threshold", dest="bbox_threshold", help="bbox_threshold", default=0.8)
parser.add_option("-r", "--overlap_threshold_rpn", dest="overlap_threshold_rpn", help="overlap_threshold_rpn", default=0.7)
parser.add_option("-c", "--overlap_threshold_classifier", dest="overlap_threshold_classifier", help="overlap_thresh_classifier", default=0.5)
parser.add_option("--output_log", dest="out_log", help="Output path for logs.", default='./log.txt')
parser.add_option("--output_log", dest="out_log", help="Output path for logs.", default='./data/log.txt')
(options, args) = parser.parse_args()
......@@ -301,7 +301,7 @@ for epoch_num in range(num_epochs):
print('Loss RPN regression: {}'.format(loss_rpn_regr))
print('Loss Detector classifier: {}'.format(loss_class_cls))
print('Loss Detector regression: {}'.format(loss_class_regr))
print('Elapsed time: {}'.format(time.time() - start_time))
print('Elapsed time: {}'.format(time.time() - start_time))
curr_loss = val_losses.get('curr_loss')# loss_rpn_cls + loss_rpn_regr + loss_class_cls + loss_class_regr
iter_num = 0
......@@ -309,8 +309,7 @@ for epoch_num in range(num_epochs):
if curr_loss < best_loss:
out = 'Total loss decreased from {} to {}, saving weights'.format(best_loss, curr_loss)
if C.verbose:
print(out)
print(out)
log.write("---\nEpoch "+str(epoch_num)+"\n")
log.write(out + "\n")
log.flush()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment