| | |
| | | #include "utils.h" |
| | | #include "cuda.h" |
| | | #include "blas.h" |
| | | #include "connected_layer.h" |
| | | |
| | | #ifdef OPENCV |
| | | #include "opencv2/highgui/highgui_c.h" |
| | |
| | | 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); |
| | | } |