Skip to content

Commit

Permalink
Add EfficientNet example using automatic augmentations with DALI (#4678)
Browse files Browse the repository at this point in the history
This example ports the [EfficientNet](https://github.com/NVIDIA/DeepLearningExamples/blob/master/PyTorch/Classification/ConvNets/efficientnet/README.md) sample from DeepLearningExamples repository.

The example is limited to efficientnet-b0 variant for simplicity. DALI pipeline is updated to use `fn` API and to use new automatic augmentations: adding options to select both AutoAugment and TrivialAugment.

The main.py is adjusted so the defaults are suitable for EfficientNet training immediately (previously they were the defaults for RN50 training) and launch.py is no longer needed - the original example was started via launch.py, that looked up default values for specific network in an .yml config and passed them to the main.py. This way we can use main.py directly without the layers of intermediate scripts. 

The benchmarks from readme are used to implement the L3 test.

Signed-off-by: Krzysztof Lecki <klecki@nvidia.com>
  • Loading branch information
klecki authored Mar 14, 2023
1 parent ebd85f0 commit 6715606
Show file tree
Hide file tree
Showing 28 changed files with 6,247 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/examples/use_cases/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"video_superres/README.rst",
"pytorch/resnet50/pytorch-resnet50.rst",
"pytorch/single_stage_detector/pytorch_ssd.rst",
"pytorch/efficientnet/readme.rst",
"tensorflow/resnet-n/README.rst",
"tensorflow/yolov4/readme.rst",
"tensorflow/efficientdet/README.rst",
Expand Down
8 changes: 8 additions & 0 deletions docs/examples/use_cases/pytorch/efficientnet/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ARG FROM_IMAGE_NAME=nvcr.io/nvidia/pytorch:21.03-py3
FROM ${FROM_IMAGE_NAME}

ADD requirements.txt /workspace/
WORKDIR /workspace/
RUN pip install --no-cache-dir -r requirements.txt
ADD . /workspace/rn50
WORKDIR /workspace/rn50
11 changes: 11 additions & 0 deletions docs/examples/use_cases/pytorch/efficientnet/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading

0 comments on commit 6715606

Please sign in to comment.