File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -812,15 +812,15 @@ struct ModelParser {
812812 }
813813 return activationLayer;
814814 }
815- else if (desc->activation == ACTIVATION_RELU) {
815+ if (desc->activation == ACTIVATION_RELU) {
816816 auto activationLayer = model->network ->addActivation (*input, ActivationType::kRELU );
817817 activationLayer->setName (desc->name .c_str ());
818818 if (forceFP32) {
819819 activationLayer->setPrecision (DataType::kFLOAT );
820820 }
821821 return activationLayer;
822822 }
823- else if (desc->activation == ACTIVATION_MISH) {
823+ if (desc->activation == ACTIVATION_MISH) {
824824 auto softplusLayer = model->network ->addActivation (*input, ActivationType::kSOFTPLUS );
825825 auto softplusLayerName = desc->name + " /softplus" ;
826826 softplusLayer->setName (softplusLayerName.c_str ());
@@ -836,7 +836,7 @@ struct ModelParser {
836836 }
837837 return mergeLayer;
838838 }
839- else if (desc->activation == ACTIVATION_MISH_SCALE8) {
839+ if (desc->activation == ACTIVATION_MISH_SCALE8) {
840840 auto softplusLayer = model->network ->addActivation (*input, ActivationType::kSOFTPLUS );
841841 softplusLayer->setAlpha (1 .0f );
842842 softplusLayer->setBeta (8 .0f );
@@ -854,9 +854,8 @@ struct ModelParser {
854854 }
855855 return mergeLayer;
856856 }
857- else {
858- ASSERT_UNREACHABLE;
859- }
857+ ASSERT_UNREACHABLE;
858+ return nullptr ;
860859 }
861860
862861 ILayer* applyGPoolLayer (ILayer* inputLayer, bool forceFP32 = false , bool isValueHead = false ) {
You can’t perform that action at this time.
0 commit comments