| 22 | namespace nvcaffeparser1 |
| 23 | { |
| 24 | ILayer* parseELU(INetworkDefinition& network, const trtcaffe::LayerParameter& msg, CaffeWeightFactory& /* weightFactory */, BlobNameToTensor& tensors) |
| 25 | { |
| 26 | if (!checkBlobs(msg, 1, 1)) |
| 27 | { |
| 28 | return nullptr; |
| 29 | } |
| 30 | |
| 31 | const trtcaffe::ELUParameter& p = msg.elu_param(); |
| 32 | |
| 33 | float alpha = 1.f; // default parameter |
| 34 | if (p.has_alpha()) |
| 35 | { |
| 36 | alpha = p.alpha(); |
| 37 | } |
| 38 | auto newLayer = network.addActivation(*tensors[msg.bottom(0)], ActivationType::kELU); |
| 39 | newLayer->setAlpha(alpha); |
| 40 | return newLayer; |
| 41 | } |
| 42 | } //namespace nvcaffeparser1 |
nothing calls this directly
no test coverage detected