Minor fixes

This commit is contained in:
AlexeyAB 2019-02-18 18:12:05 +03:00
parent 3e2ef94130
commit 5e850c2489
4 changed files with 6 additions and 6 deletions

View File

@ -156,7 +156,7 @@ void train_classifier(char *datacfg, char *cfgfile, char *weightfile, int *gpus,
i = get_current_batch(net);
int calc_topk_for_each = iter_topk + 4 * train_images_num / (net.batch * net.subdivisions); // calculate TOPk for each 4 Epochs
int calc_topk_for_each = iter_topk + 2 * train_images_num / (net.batch * net.subdivisions); // calculate TOPk for each 2 Epochs
calc_topk_for_each = fmax(calc_topk_for_each, net.burn_in);
calc_topk_for_each = fmax(calc_topk_for_each, 1000);
if (i % 10 == 0) {

View File

@ -289,7 +289,7 @@ void train_detector(char *datacfg, char *cfgfile, char *weightfile, int *gpus, i
//if (i % 1000 == 0 || (i < 1000 && i % 100 == 0)) {
//if (i % 100 == 0) {
if (i >= (iter_save + 1000)) {
if (i >= (iter_save + 1000) || i % 1000 == 0) {
iter_save = i;
#ifdef GPU
if (ngpus != 1) sync_nets(nets, ngpus, 0);
@ -299,7 +299,7 @@ void train_detector(char *datacfg, char *cfgfile, char *weightfile, int *gpus, i
save_weights(net, buff);
}
if (i >= (iter_save_last + 100)) {
if (i >= (iter_save_last + 100) || i % 100 == 0) {
iter_save_last = i;
#ifdef GPU
if (ngpus != 1) sync_nets(nets, ngpus, 0);

View File

@ -102,7 +102,7 @@ class MJPG_sender
SOCKET sock;
SOCKET maxfd;
fd_set master;
int timeout; // master sock timeout, shutdown after timeout millis.
int timeout; // master sock timeout, shutdown after timeout usec.
int quality; // jpeg compression [1..100]
int close_all_sockets;
@ -289,7 +289,7 @@ class JSON_sender
SOCKET sock;
SOCKET maxfd;
fd_set master;
int timeout; // master sock timeout, shutdown after timeout millis.
int timeout; // master sock timeout, shutdown after timeout usec.
int close_all_sockets;
int _write(int sock, char const*const s, int len)

View File

@ -821,7 +821,7 @@ void draw_train_loss(IplImage* img, int img_size, float avg_loss, float max_img_
else
cvPutText(img, "- Saved", cvPoint(250, img_size - 10), &font, CV_RGB(255, 255, 255));
if (mjpeg_port > 0) send_mjpeg(img, mjpeg_port, 2000, 80);
if (mjpeg_port > 0) send_mjpeg(img, mjpeg_port, 200000, 80);
}
#endif // OPENCV