mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
so much need to commit
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user