Commit 205b60f867c7bef5f1652f4faf0f1158ab7f87d4
1 parent
c33f46cc
Static cast instead of dynamic
Showing
1 changed file
with
1 additions
and
1 deletions
openbr/plugins/classification/caffe.cpp
| ... | ... | @@ -93,7 +93,7 @@ class CaffeFVTransform : public UntrainableMetaTransform |
| 93 | 93 | if (net->layers()[0]->layer_param().type() != "MemoryData") |
| 94 | 94 | qFatal("OpenBR requires the first layer in the network to be a MemoryDataLayer"); |
| 95 | 95 | |
| 96 | - MemoryDataLayer<float> *dataLayer = dynamic_cast<MemoryDataLayer<float> *>(net->layers()[0].get()); | |
| 96 | + MemoryDataLayer<float> *dataLayer = static_cast<MemoryDataLayer<float> *>(net->layers()[0].get()); | |
| 97 | 97 | |
| 98 | 98 | if (src.size() != dataLayer->batch_size()) |
| 99 | 99 | qFatal("src should have %d (batch size) mats. It has %d mats.", dataLayer->batch_size(), src.size()); | ... | ... |