MCPcopy Create free account
hub / github.com/amov-lab/Prometheus / sync_nets

Function sync_nets

Modules/object_detection/src/darknet_lib/src/network.c:1072–1089  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1070}
1071
1072void sync_nets(network **nets, int n, int interval)
1073{
1074 int j;
1075 int layers = nets[0]->n;
1076 pthread_t *threads = (pthread_t *) calloc(layers, sizeof(pthread_t));
1077
1078 *(nets[0]->seen) += interval * (n-1) * nets[0]->batch * nets[0]->subdivisions;
1079 for (j = 0; j < n; ++j){
1080 *(nets[j]->seen) = *(nets[0]->seen);
1081 }
1082 for (j = 0; j < layers; ++j) {
1083 threads[j] = sync_layer_in_thread(nets, n, j);
1084 }
1085 for (j = 0; j < layers; ++j) {
1086 pthread_join(threads[j], 0);
1087 }
1088 free(threads);
1089}
1090
1091float train_networks(network **nets, int n, data d, int interval)
1092{

Callers 2

train_networksFunction · 0.85
train_detectorFunction · 0.85

Calls 1

sync_layer_in_threadFunction · 0.85

Tested by

no test coverage detected