Loss-graph store automatically (iterations == max_batches) at the end of training

This commit is contained in:
AlexeyAB 2018-04-16 13:09:10 +03:00
parent 6aa140b3c6
commit c52fa47428
3 changed files with 3 additions and 3 deletions

View File

@ -248,7 +248,7 @@ void cudnn_convolutional_setup(layer *l, int cudnn_preference)
//printf("Tensor Cores - Backward-filter enabled: l->bf_algo = CUDNN_CONVOLUTION_BWD_FILTER_ALGO_WINOGRAD_NONFUSED \n");
if (fw == 2 && bd == 2 && bf == 2) printf("TF ");
else if (fw >= 1 && bd >= 1 && bf >= 1) printf("TH ");
else if (fw == 1 && bd == 1 && bf == 1) printf("TH ");
}
}
#endif

View File

@ -99,7 +99,7 @@ void train_detector(char *datacfg, char *cfgfile, char *weightfile, int *gpus, i
args.hue = net.hue;
#ifdef OPENCV
args.threads = 7;
args.threads = 3;
IplImage* img = NULL;
float max_img_loss = 5;
int number_of_lines = 100;

View File

@ -572,7 +572,7 @@ void draw_train_loss(IplImage* img, int img_size, float avg_loss, float max_img_
cvPutText(img, char_buff, pt1, &font, CV_RGB(0, 0, 0));
cvShowImage("average loss", img);
int k = cvWaitKey(20);
if (k == 's') cvSaveImage("chart.jpg", img, 0);
if (k == 's' || current_batch == (max_batches-1)) cvSaveImage("chart.jpg", img, 0);
}
#endif // OPENCV