This commit is contained in:
Francesco Gatti
2018-12-21 15:28:47 +01:00
parent c13bda3863
commit 7a51b4382d
4 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ Region::Region(Network *net, int classes, int coords, int num) :
output_dim.w = input_dim.w;
output_dim.l = input_dim.l;
checkCuda( cudaMalloc(&dstData, input_dim.tot()*sizeof(dnnType)) );
checkCuda( cudaMalloc(&dstData, output_dim.tot()*sizeof(dnnType)) );
}
Region::~Region() {
+1 -1
View File
@@ -15,7 +15,7 @@ Reorg::Reorg(Network *net, int stride) : Layer(net) {
output_dim.w = input_dim.w/stride;
output_dim.l = input_dim.l;
checkCuda( cudaMalloc(&dstData, input_dim.tot()*sizeof(dnnType)) );
checkCuda( cudaMalloc(&dstData, output_dim.tot()*sizeof(dnnType)) );
}
Reorg::~Reorg() {
+1 -1
View File
@@ -24,7 +24,7 @@ Yolo::Yolo(Network *net, int classes, int num) :
output_dim.w = input_dim.w;
output_dim.l = input_dim.l;
checkCuda( cudaMalloc(&dstData, input_dim.tot()*sizeof(dnnType)) );
checkCuda( cudaMalloc(&dstData, output_dim.tot()*sizeof(dnnType)) );
}
Yolo::~Yolo() {
+4 -4
View File
@@ -77,7 +77,7 @@ const char *c102_bin = "../tests/yolo3_berkeley/layers/c102.bin";
const char *c103_bin = "../tests/yolo3_berkeley/layers/c103.bin";
const char *c104_bin = "../tests/yolo3_berkeley/layers/c104.bin";
const char *c105_bin = "../tests/yolo3_berkeley/layers/c105.bin";
const char *output_bin = "../tests/yolo3_berkeley/debug/layer105_out.bin";
const char *output_bin = "../tests/yolo3_berkeley/debug/layer106_out.bin";
int main() {
@@ -234,7 +234,7 @@ int main() {
tk::dnn::Conv2d c80 (&net,1024, 3, 3, 1, 1, 1, 1, c80_bin, true);
tk::dnn::Activation a80 (&net, tk::dnn::ACTIVATION_LEAKY);
tk::dnn::Conv2d c81 (&net, 45, 1, 1, 1, 1, 0, 0, c81_bin, false);
// tk::dnn::Yolo g82 (&net, 10, 9);
tk::dnn::Yolo g82 (&net, 10, 3);
tk::dnn::Layer *m83_layers[1] = { &a79 };
tk::dnn::Route m83 (&net, m83_layers, 1);
@@ -257,7 +257,7 @@ int main() {
tk::dnn::Conv2d c92 (&net, 512, 3, 3, 1, 1, 1, 1, c92_bin, true);
tk::dnn::Activation a92 (&net, tk::dnn::ACTIVATION_LEAKY);
tk::dnn::Conv2d c93 (&net, 45, 1, 1, 1, 1, 0, 0, c93_bin, false);
// tk::dnn::Yolo g94 (&net, 10, 9);
tk::dnn::Yolo g94 (&net, 10, 3);
tk::dnn::Layer *m95_layers[1] = { &a91 };
tk::dnn::Route m95 (&net, m95_layers, 1);
@@ -282,7 +282,7 @@ int main() {
tk::dnn::Conv2d c104 (&net, 256, 3, 3, 1, 1, 1, 1, c104_bin, true);
tk::dnn::Activation a104 (&net, tk::dnn::ACTIVATION_LEAKY);
tk::dnn::Conv2d c105 (&net, 45, 1, 1, 1, 1, 0, 0, c105_bin, false);
// tk::dnn::Yolo g106 (&net, 10, 9);
tk::dnn::Yolo g106 (&net, 10, 3);
// Load input
dnnType *data;