yolo3 ok
This commit is contained in:
+1
-1
@@ -25,7 +25,7 @@ Region::Region(Network *net, int classes, int coords, int num) :
|
|||||||
output_dim.w = input_dim.w;
|
output_dim.w = input_dim.w;
|
||||||
output_dim.l = input_dim.l;
|
output_dim.l = input_dim.l;
|
||||||
|
|
||||||
checkCuda( cudaMalloc(&dstData, input_dim.tot()*sizeof(dnnType)) );
|
checkCuda( cudaMalloc(&dstData, output_dim.tot()*sizeof(dnnType)) );
|
||||||
}
|
}
|
||||||
|
|
||||||
Region::~Region() {
|
Region::~Region() {
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@ Reorg::Reorg(Network *net, int stride) : Layer(net) {
|
|||||||
output_dim.w = input_dim.w/stride;
|
output_dim.w = input_dim.w/stride;
|
||||||
output_dim.l = input_dim.l;
|
output_dim.l = input_dim.l;
|
||||||
|
|
||||||
checkCuda( cudaMalloc(&dstData, input_dim.tot()*sizeof(dnnType)) );
|
checkCuda( cudaMalloc(&dstData, output_dim.tot()*sizeof(dnnType)) );
|
||||||
}
|
}
|
||||||
|
|
||||||
Reorg::~Reorg() {
|
Reorg::~Reorg() {
|
||||||
|
|||||||
+1
-1
@@ -24,7 +24,7 @@ Yolo::Yolo(Network *net, int classes, int num) :
|
|||||||
output_dim.w = input_dim.w;
|
output_dim.w = input_dim.w;
|
||||||
output_dim.l = input_dim.l;
|
output_dim.l = input_dim.l;
|
||||||
|
|
||||||
checkCuda( cudaMalloc(&dstData, input_dim.tot()*sizeof(dnnType)) );
|
checkCuda( cudaMalloc(&dstData, output_dim.tot()*sizeof(dnnType)) );
|
||||||
}
|
}
|
||||||
|
|
||||||
Yolo::~Yolo() {
|
Yolo::~Yolo() {
|
||||||
|
|||||||
@@ -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 *c103_bin = "../tests/yolo3_berkeley/layers/c103.bin";
|
||||||
const char *c104_bin = "../tests/yolo3_berkeley/layers/c104.bin";
|
const char *c104_bin = "../tests/yolo3_berkeley/layers/c104.bin";
|
||||||
const char *c105_bin = "../tests/yolo3_berkeley/layers/c105.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() {
|
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::Conv2d c80 (&net,1024, 3, 3, 1, 1, 1, 1, c80_bin, true);
|
||||||
tk::dnn::Activation a80 (&net, tk::dnn::ACTIVATION_LEAKY);
|
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::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::Layer *m83_layers[1] = { &a79 };
|
||||||
tk::dnn::Route m83 (&net, m83_layers, 1);
|
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::Conv2d c92 (&net, 512, 3, 3, 1, 1, 1, 1, c92_bin, true);
|
||||||
tk::dnn::Activation a92 (&net, tk::dnn::ACTIVATION_LEAKY);
|
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::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::Layer *m95_layers[1] = { &a91 };
|
||||||
tk::dnn::Route m95 (&net, m95_layers, 1);
|
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::Conv2d c104 (&net, 256, 3, 3, 1, 1, 1, 1, c104_bin, true);
|
||||||
tk::dnn::Activation a104 (&net, tk::dnn::ACTIVATION_LEAKY);
|
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::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
|
// Load input
|
||||||
dnnType *data;
|
dnnType *data;
|
||||||
|
|||||||
Reference in New Issue
Block a user