Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyAB committed Feb 18, 2019
1 parent 3e2ef94 commit 5e850c2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/classifier.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/detector.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/http_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/image.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5e850c2

Please sign in to comment.