Skip to content

Commit 5e850c2

Browse files
committed
Minor fixes
1 parent 3e2ef94 commit 5e850c2

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/classifier.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ void train_classifier(char *datacfg, char *cfgfile, char *weightfile, int *gpus,
156156

157157
i = get_current_batch(net);
158158

159-
int calc_topk_for_each = iter_topk + 4 * train_images_num / (net.batch * net.subdivisions); // calculate TOPk for each 4 Epochs
159+
int calc_topk_for_each = iter_topk + 2 * train_images_num / (net.batch * net.subdivisions); // calculate TOPk for each 2 Epochs
160160
calc_topk_for_each = fmax(calc_topk_for_each, net.burn_in);
161161
calc_topk_for_each = fmax(calc_topk_for_each, 1000);
162162
if (i % 10 == 0) {

src/detector.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ void train_detector(char *datacfg, char *cfgfile, char *weightfile, int *gpus, i
289289

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

302-
if (i >= (iter_save_last + 100)) {
302+
if (i >= (iter_save_last + 100) || i % 100 == 0) {
303303
iter_save_last = i;
304304
#ifdef GPU
305305
if (ngpus != 1) sync_nets(nets, ngpus, 0);

src/http_stream.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class MJPG_sender
102102
SOCKET sock;
103103
SOCKET maxfd;
104104
fd_set master;
105-
int timeout; // master sock timeout, shutdown after timeout millis.
105+
int timeout; // master sock timeout, shutdown after timeout usec.
106106
int quality; // jpeg compression [1..100]
107107
int close_all_sockets;
108108

@@ -289,7 +289,7 @@ class JSON_sender
289289
SOCKET sock;
290290
SOCKET maxfd;
291291
fd_set master;
292-
int timeout; // master sock timeout, shutdown after timeout millis.
292+
int timeout; // master sock timeout, shutdown after timeout usec.
293293
int close_all_sockets;
294294

295295
int _write(int sock, char const*const s, int len)

src/image.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ void draw_train_loss(IplImage* img, int img_size, float avg_loss, float max_img_
821821
else
822822
cvPutText(img, "- Saved", cvPoint(250, img_size - 10), &font, CV_RGB(255, 255, 255));
823823

824-
if (mjpeg_port > 0) send_mjpeg(img, mjpeg_port, 2000, 80);
824+
if (mjpeg_port > 0) send_mjpeg(img, mjpeg_port, 200000, 80);
825825
}
826826
#endif // OPENCV
827827

0 commit comments

Comments
 (0)