@@ -257,34 +257,8 @@ ILayer* SPP(INetworkDefinition *network, std::map<std::string, Weights>& weightM
257257 auto cv2 = convBlock (network, weightMap, *cat->getOutput (0 ), c2, 1 , 1 , 1 , lname + " .cv2" );
258258 return cv2;
259259}
260- // SPPF
261- ILayer* SPPF (INetworkDefinition *network, std::map<std::string, Weights>& weightMap, ITensor& input, int c1, int c2, int k, std::string lname) {
262- int c_ = c1 / 2 ;
263- auto cv1 = convBlock (network, weightMap, input, c_, 1 , 1 , 1 , lname + " .cv1" );
264-
265- auto pool1 = network->addPoolingNd (*cv1->getOutput (0 ), PoolingType::kMAX , DimsHW{ k, k });
266- pool1->setPaddingNd (DimsHW{ k / 2 , k / 2 });
267- pool1->setStrideNd (DimsHW{ 1 , 1 });
268- auto pool2 = network->addPoolingNd (*pool1->getOutput (0 ), PoolingType::kMAX , DimsHW{ k, k });
269- pool2->setPaddingNd (DimsHW{ k / 2 , k / 2 });
270- pool2->setStrideNd (DimsHW{ 1 , 1 });
271- auto pool3 = network->addPoolingNd (*pool2->getOutput (0 ), PoolingType::kMAX , DimsHW{ k, k });
272- pool3->setPaddingNd (DimsHW{ k / 2 , k / 2 });
273- pool3->setStrideNd (DimsHW{ 1 , 1 });
274- ITensor* inputTensors[] = { cv1->getOutput (0 ), pool1->getOutput (0 ), pool2->getOutput (0 ), pool3->getOutput (0 ) };
275- auto cat = network->addConcatenation (inputTensors, 4 );
276- auto cv2 = convBlock (network, weightMap, *cat->getOutput (0 ), c2, 1 , 1 , 1 , lname + " .cv2" );
277- return cv2;
278- }
279-
280- //
281-
282-
283-
284-
285260
286- // SPPF
287- ILayer* SPPF (INetworkDefinition *network, std::map<std::string, Weights>& weightMap, ITensor& input, int c1, int c2, int k, std::string lname) {
261+ ILayer* SPPF (INetworkDefinition *network, std::map<std::string, Weights>& weightMap, ITensor& input, int c1, int c2, int k, std::string lname) {
288262 int c_ = c1 / 2 ;
289263 auto cv1 = convBlock (network, weightMap, input, c_, 1 , 1 , 1 , lname + " .cv1" );
290264
0 commit comments