Shelfnet works on tensorRT (shortcut need to be fixed)

Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com>
This commit is contained in:
Micaela Verucchi
2020-06-23 12:50:24 +02:00
parent 6fd261f628
commit 94e558003d
9 changed files with 75 additions and 100 deletions
+3 -5
View File
@@ -11,11 +11,9 @@ Shortcut::Shortcut(Network *net, Layer *backLayer, bool mul) : Layer(net) {
this->mul = mul;
checkCuda( cudaMalloc(&dstData, output_dim.tot()*sizeof(dnnType)) );
//FIXME
// if( /*backLayer->output_dim.c != input_dim.c ||*/
// backLayer->output_dim.w != input_dim.w ||
// backLayer->output_dim.h != input_dim.h )
// FatalError("Shortcut dim missmatch");
if( ( backLayer->output_dim.c != input_dim.c && mul ) ||
(( backLayer->output_dim.w != input_dim.w || backLayer->output_dim.h != input_dim.h ) && !mul ) )
FatalError("Shortcut dim missmatch");
}