Avg-loss will be saved to the 2 images: chart.png & chart_your_cfg_name.png

This commit is contained in:
AlexeyAB 2019-12-24 22:03:59 +03:00
parent 719180e7f1
commit 81c5bcea92
2 changed files with 2 additions and 1 deletions

View File

@ -148,7 +148,7 @@ void train_detector(char *datacfg, char *cfgfile, char *weightfile, int *gpus, i
int number_of_lines = 100;
int img_size = 1000;
char windows_name[100];
sprintf(windows_name, "average loss (id:%d)", random_gen());
sprintf(windows_name, "chart_%s.png", base);
img = draw_train_chart(windows_name, max_img_loss, net.max_batches, number_of_lines, img_size, dont_show);
#endif //OPENCV
if (net.track) {

View File

@ -1120,6 +1120,7 @@ extern "C" void draw_train_loss(char *windows_name, mat_cv* img_src, int img_siz
if (k == 's' || current_batch == (max_batches - 1) || (current_batch / 100 > old_batch / 100)) {
old_batch = current_batch;
save_mat_png(img, "chart.png");
save_mat_png(img, windows_name);
cv::putText(img, "- Saved", cv::Point(260, img_size - 10), cv::FONT_HERSHEY_COMPLEX_SMALL, 0.7, CV_RGB(255, 0, 0), 1, CV_AA);
}
else