From b689ef275c110063365ce592982287511946f013 Mon Sep 17 00:00:00 2001 From: Wang Xinyu Date: Fri, 21 Feb 2020 16:35:46 +0800 Subject: [PATCH 1/3] Update README.md --- senet/README.md | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/senet/README.md b/senet/README.md index 1210419..5ece084 100644 --- a/senet/README.md +++ b/senet/README.md @@ -1,23 +1,20 @@ -# mobilenet v2 +# SENet -MobileNetV2 architecture from - "MobileNetV2: Inverted Residuals and Linear Bottlenecks" . +An implementation of SENet, proposed in Squeeze-and-Excitation Networks by Jie Hu, Li Shen, Samuel Albanie, Gang Sun, Enhua Wu -For the Pytorch implementation, you can refer to [pytorchx/mobilenet](https://github.com/wang-xinyu/pytorchx/tree/master/mobilenet) +[https://arxiv.org/abs/1709.01507](https://arxiv.org/abs/1709.01507) -Following tricks are used in this mobilenet, +For the Pytorch implementation, you can refer to [wang-xinyu/senet.pytorch](https://github.com/wang-xinyu/senet.pytorch). -- Relu6 is used in mobilenet v2. We use `Relu6(x) = Relu(x) - Relu(x-6)` in tensorrt. -- Batchnorm layer, implemented by scale layer. ``` -// 1. generate mobilenet.wts from [pytorchx/mobilenet](https://github.com/wang-xinyu/pytorchx/tree/master/mobilenet) +// 1. generate se_resnet50.wts from [wang-xinyu/senet.pytorch](https://github.com/wang-xinyu/senet.pytorch) -// 2. put mobilenet.wts into tensorrtx/mobilenet +// 2. put se_resnet50.wts into tensorrtx/senet // 3. build and run -cd tensorrtx/mobilenet +cd tensorrtx/senet mkdir build @@ -27,11 +24,10 @@ cmake .. make -sudo ./mobilenet -s // serialize model to plan file i.e. 'mobilenet.engine' +sudo ./se_resnet -s // serialize model to plan file i.e. 'se_resnet50.engine' -sudo ./mobilenet -d // deserialize plan file and run inference +sudo ./se_resnet -d // deserialize plan file and run inference -// 4. see if the output is same as pytorchx/mobilenet +// 4. see if the output is same as [wang-xinyu/senet.pytorch] ``` - From 4a8d79d82fde90fa0020f4f10889289bfe327313 Mon Sep 17 00:00:00 2001 From: Wang Xinyu Date: Fri, 21 Feb 2020 16:43:53 +0800 Subject: [PATCH 2/3] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 63a5655..06a70ec 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,9 @@ Following models are implemented, each one also has a readme inside. |[googlenet](./googlenet)| GoogLeNet (Inception v1) | |[inception](./inceptionv3)| Inception v3 | |[mnasnet](./mnasnet)| MNASNet with depth multiplier of 0.5 from the paper | -|[mobilenet](./mobilenetv2)| MobileNet V2 | +|[mobilenet](./mobilenetv2)| MobileNet V2, V3-small, V3-large. | |[resnet](./resnet)| resnet-18, resnet-50 and resnext50-32x4d are implemented | +|[senet](./senet)| se_resnet50 | |[shufflenet](./shufflenetv2)| ShuffleNetV2 with 0.5x output channels | |[squeezenet](./squeezenet)| SqueezeNet 1.1 model | |[vgg](./vgg)| VGG 11-layer model | From a8a72e01e522a7efd985f5d9fb39ec4d9814314a Mon Sep 17 00:00:00 2001 From: Wang Xinyu Date: Fri, 21 Feb 2020 16:49:16 +0800 Subject: [PATCH 3/3] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 06a70ec..707c3b6 100644 --- a/README.md +++ b/README.md @@ -50,4 +50,5 @@ Some tricky operations encountered in these models, already solved, but might ha |leaky relu| I wrote a leaky relu plugin, but PRelu in `NvInferPlugin.h` can be used, see yolov3. | |yolo layer| yolo layer is implemented as a plugin, see yolov3. | |upsample| replaced by a deconvolution layer, see yolov3. | +|hsigmoid| hard sigmoid is implemented as a plugin, hsigmoid and hswish are used in mobilenetv3 |