Fixed bug, that save weights-file for each iteration
| | |
| | | [net] |
| | | batch=64 |
| | | subdivisions=8 |
| | | subdivisions=32 |
| | | height=416 |
| | | width=416 |
| | | channels=3 |
| | |
| | | |
| | | absolute=1 |
| | | thresh = .6 |
| | | random=0 |
| | | random=1 |
| | |
| | | [net] |
| | | batch=64 |
| | | subdivisions=8 |
| | | subdivisions=32 |
| | | height=416 |
| | | width=416 |
| | | channels=3 |
| | |
| | | |
| | | absolute=1 |
| | | thresh = .6 |
| | | random=0 |
| | | random=1 |
| | |
| | | printf("video file: %s\n", filename); |
| | | cap = cvCaptureFromFile(filename); |
| | | }else{ |
| | | printf("Webcam index: %d\n", cam_index); |
| | | cap = cvCaptureFromCAM(cam_index); |
| | | } |
| | | |
| | |
| | | float avg_loss = -1; |
| | | network *nets = calloc(ngpus, sizeof(network)); |
| | | |
| | | int iter_save; |
| | | iter_save = 100; |
| | | |
| | | srand(time(0)); |
| | | int seed = rand(); |
| | | int i; |
| | |
| | | |
| | | int init_w = net.w; |
| | | int init_h = net.h; |
| | | int iter_save; |
| | | iter_save = get_current_batch(net); |
| | | |
| | | load_args args = {0}; |
| | | args.w = net.w; |
| | |
| | | |
| | | //if (i % 1000 == 0 || (i < 1000 && i % 100 == 0)) { |
| | | //if (i % 100 == 0) { |
| | | if(i >= iter_save) { |
| | | iter_save += 100; |
| | | if(i >= (iter_save + 100)) { |
| | | iter_save = i; |
| | | #ifdef GPU |
| | | if (ngpus != 1) sync_nets(nets, ngpus, 0); |
| | | #endif |