NVIDIA Deep Learning Examples
NVIDIA Deep Learning Examples
EfficientNet V1 For Tensorflow2
Resource
NVIDIA Deep Learning Examples
NVIDIA Deep Learning Examples
EfficientNet V1 For Tensorflow2

EfficientNets are a family of image classification models, which achieve state-of-the-art accuracy, being an order-of-magnitude smaller and faster.

The performance measurements in this document were conducted at the time of publication and may not reflect the performance achieved from NVIDIA's latest software release. For the most up-to-date performance measurements, go to NVIDIA Data Center Deep Learning Product Performance.

Benchmarking

The following section shows how to run benchmarks measuring the model performance in training and inference modes.

Training performance benchmark

Training benchmark for EfficientNet v1-B0 was run on NVIDIA DGX A100 80GB and NVIDIA DGX-1 V100 32GB.

To benchmark training performance with other parameters, run:

bash ./scripts/B0/training/{AMP, FP32, TF32}/train_benchmark_8x{A100-80G, V100-32G}.sh

Training benchmark for EfficientNet v1-B4 was run on NVIDIA DGX A100 80GB and NVIDIA DGX-1 V100 32GB.

bash ./scripts/B4/training/{AMP, FP32, TF32}/train_benchmark_8x{A100-80G, V100-32G}.sh

Inference performance benchmark

Inference benchmark for EfficientNet v1-B0 was run on NVIDIA DGX A100 80GB and NVIDIA DGX-1 V100 32GB.

Inference benchmark for EfficientNet v1-B4 was run on NVIDIA DGX A100 80GB and NVIDIA DGX-1 V100 32GB.

Results

The following sections provide details on how we achieved our performance and accuracy in training and inference.

Training accuracy results for EfficientNet v1-B0

Training accuracy: NVIDIA DGX A100 (8x A100 80GB)

Our results were obtained by running the training scripts in the tensorflow:21.09-tf2-py3 NGC container on NVIDIA DGX A100 (8x A100 80GB) GPUs. We evaluated the models using both the original and EMA weights and selected the higher accuracy to report.

GPUsAccuracy - TF32Accuracy - mixed precisionTime to train - TF32Time to train - mixed precisionTime to train speedup (TF32 to mixed precision)
877.60%77.59%19.5hrs8.5hrs2.29
1677.51%77.48%10hrs4.5hrs2.22
Training accuracy: NVIDIA DGX-1 (8x V100 32GB)

Our results were obtained by running the training scripts in the tensorflow:21.09-tf2-py3 NGC container on NVIDIA DGX V100 (8x V100 32GB) GPUs. We evaluated the models using both the original and EMA weights and selected the higher accuracy to report.

GPUsAccuracy - FP32Accuracy - mixed precisionTime to train - FP32Time to train - mixed precisionTime to train speedup (FP32 to mixed precision)
877.67%77.69%49.0hrs38.0hrs1.29
3277.55%77.53%11.5hrs10hrs1.15

Training accuracy results for EfficientNet v1-B4

Training accuracy: NVIDIA DGX A100 (8x A100 80GB)

Our results were obtained by running the training scripts in the tensorflow:21.09-tf2-py3 NGC container on multi-node NVIDIA DGX A100 (8x A100 80GB) GPUs. We evaluated the models using both the original and EMA weights and selected the higher accuracy to report.

GPUsAccuracy - TF32Accuracy - mixed precisionTime to train - TF32Time to train - mixed precisionTime to train speedup (TF32 to mixed precision)
3282.98%83.13%38hrs14hrs2.00
6483.14%83.05%19hrs7hrs2.00
Training accuracy: NVIDIA DGX V100 (8x V100 32GB)

Our results were obtained by running the training scripts in the tensorflow:21.09-tf2-py3 NGC container on NVIDIA DGX V100 (8x A100 32GB) GPUs. We evaluated the models using both the original and EMA weights and selected the higher accuracy to report.

GPUsAccuracy - FP32Accuracy - mixed precisionTime to train - TF32Time to train - mixed precisionTime to train speedup (FP32 to mixed precision)
3282.64%82.88%97.0hrs41.0hrs2.37
6482.74%83.16%50.0hrs20.5hrs2.43

Training performance results for EfficientNet v1-B0

Training performance: NVIDIA DGX A100 (8x A100 80GB)
GPUsThroughput - TF32Throughput - mixed precisionThroughput speedup (TF32 - mixed precision)Weak scaling - TF32Weak scaling - mixed precision
1120934542.8511
89119206472.267.545.98
1617815406442.2814.7411.77
Training performance: NVIDIA DGX-1 (8x V100 32GB)
GPUsThroughput - FP32Throughput - mixed precisionThroughput speedup (FP32 - mixed precision)Weak scaling - FP32Weak scaling - mixed precision
17528681.1511
8450448801.085.995.62
3215309184241.2020.3621.23

Training performance results for EfficientNet v1-B4

Training performance: NVIDIA DGX A100 (8x A100 80GB)
GPUsThroughput - TF32Throughput - mixed precisionThroughput speedup (TF32 - mixed precision)Weak scaling - TF32Weak scaling - mixed precision
11654702.8511
8130835502.717.937.55
324782129082.7028.9827.46
649473254552.6957.4154.16
Training performance: NVIDIA DGX-1 (8x V100 32GB)
GPUsThroughput - FP32Throughput - mixed precisionThroughput speedup (FP32 - mixed precision)Weak scaling - TF32Weak scaling - mixed precision
1792112.6711
857012582.217.225.96
32185543252.3323.4820.50
64356886432.4245.1640.96

Inference performance results for EfficientNet v1-B0

Inference performance: NVIDIA DGX A100 (1x A100 80GB)

Our results were obtained by running the inferencing benchmarking script in the tensorflow:21.09-tf2-py3 NGC container on the NVIDIA DGX A100 (1x A100 80GB) GPU.

FP16 Inference Latency

Batch sizeResolutionThroughput AvgLatency Avg (ms)Latency 90% (ms)Latency 95% (ms)Latency 99% (ms)
1224x224110.979.099.029.049.09
8224x224874.919.129.049.089.12
32224x2242188.8414.6214.3514.4314.52
1024224x2249729.85105.24101.50103.20105.24

TF32 Inference Latency

Batch sizeResolutionThroughput AvgLatency Avg (ms)Latency 90% (ms)Latency 95% (ms)Latency 99% (ms)
1224x224127.957.887.837.847.87
8224x224892.278.978.888.918.94
32224x2242185.0214.6514.3314.4314.54
512224x2245253.1997.4696.5797.0397.46
Inference performance: NVIDIA DGX-1 (1x V100 32GB)

FP16 Inference Latency

Batch sizeResolutionThroughput AvgLatency Avg (ms)Latency 90% (ms)Latency 95% (ms)Latency 99% (ms)
1224x22497.5310.2510.1110.1310.21
8224x224752.7210.6310.4910.5410.59
32224x2241768.0518.1017.8817.9618.04
512224x2245399.8894.8292.8593.8994.82

FP32 Inference Latency

Batch sizeResolutionThroughput AvgLatency Avg (ms)Latency 90% (ms)Latency 95% (ms)Latency 99% (ms)
1224x22497.0110.3110.1710.2210.28
8224x224649.7912.3112.1612.2212.28
32224x2241861.6517.1916.9817.0317.10
256224x2242829.3490.4889.8090.1390.43

Inference performance results for EfficientNet v1-B4

Inference performance: NVIDIA DGX A100 (1x A100 80GB)

Our results were obtained by running the inferencing benchmarking script in the tensorflow:21.09-tf2-py3 NGC container on the NVIDIA DGX A100 (1x A100 80GB) GPU.

FP16 Inference Latency

Batch sizeResolutionThroughput AvgLatency Avg (ms)Latency 90% (ms)Latency 95% (ms)Latency 99% (ms)
1380x38061.3616.3016.2016.2416.28
8380x380338.6023.6323.3423.4623.58
32380x380971.6832.9332.4632.6132.76
128380x3801497.2185.2883.0183.6884.70

TF32 Inference Latency

Batch sizeResolutionThroughput AvgLatency Avg (ms)Latency 90% (ms)Latency 95% (ms)Latency 99% (ms)
1380x38060.5416.5216.3416.4116.49
8380x380366.8221.8121.4821.6121.75
32380x380642.7849.7849.4149.5349.65
64380x380714.5589.5489.0089.1789.34
Inference performance: NVIDIA DGX-1 (1x V100 32GB)

FP16 Inference Latency

Batch sizeResolutionThroughput AvgLatency Avg (ms)Latency 90% (ms)Latency 95% (ms)Latency 99% (ms)
1380x38055.7117.9517.6817.9317.86
8380x380256.7231.1630.9231.0231.12
16380x380350.1445.7545.4445.5745.68
64380x380805.2179.4678.7478.8679.01

TF32 Inference Latency

Batch sizeResolutionThroughput AvgLatency Avg (ms)Latency 90% (ms)Latency 95% (ms)Latency 99% (ms)
1380x38049.0320.4020.0320.1820.34
8380x380258.2130.9830.8330.8930.95
16380x380310.8451.4751.2651.3451.42
32380x380372.2385.9785.7085.7985.89