so much need to commit

This commit is contained in:
Joseph Redmon
2016-05-06 16:25:16 -07:00
parent 0dff437a69
commit c7b10ceadb
37 changed files with 1502 additions and 438 deletions

View File

@ -6,6 +6,7 @@
#include "utils.h"
#include "cuda.h"
#include "blas.h"
#include "connected_layer.h"
#ifdef OPENCV
#include "opencv2/highgui/highgui_c.h"
@ -182,6 +183,25 @@ void denormalize_net(char *cfgfile, char *weightfile, char *outfile)
denormalize_convolutional_layer(l);
net.layers[i].batch_normalize=0;
}
if (l.type == CONNECTED && l.batch_normalize) {
denormalize_connected_layer(l);
net.layers[i].batch_normalize=0;
}
if (l.type == GRU && l.batch_normalize) {
denormalize_connected_layer(*l.input_z_layer);
denormalize_connected_layer(*l.input_r_layer);
denormalize_connected_layer(*l.input_h_layer);
denormalize_connected_layer(*l.state_z_layer);
denormalize_connected_layer(*l.state_r_layer);
denormalize_connected_layer(*l.state_h_layer);
l.input_z_layer->batch_normalize = 0;
l.input_r_layer->batch_normalize = 0;
l.input_h_layer->batch_normalize = 0;
l.state_z_layer->batch_normalize = 0;
l.state_r_layer->batch_normalize = 0;
l.state_h_layer->batch_normalize = 0;
net.layers[i].batch_normalize=0;
}
}
save_weights(net, outfile);
}