Skip to content

docs: minor changes in Resnet50 example #1427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions notebooks/Resnet50-example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,7 @@
"<a id=\"3\"></a>\n",
"## 3. Running the model without optimizations\n",
"\n",
"\n",
"PyTorch has a model repository called `timm`, which is a source for high quality implementations of computer vision models. We can get our EfficientNet model from there pretrained on ImageNet."
Copy link
Contributor Author

@przemb przemb Oct 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy paste...
Please check line 193

"\n"
]
},
{
Expand Down Expand Up @@ -850,7 +849,7 @@
"# The compiled module will have precision as specified by \"op_precision\".\n",
"# Here, it will have FP16 precision.\n",
"trt_model_fp16 = torch_tensorrt.compile(model, inputs = [torch_tensorrt.Input((128, 3, 224, 224), dtype=torch.half)],\n",
" enabled_precisions = {torch.half}, # Run with FP32\n",
" enabled_precisions = {torch.half}, # Run with FP16\n",
" workspace_size = 1 << 22\n",
")\n"
]
Expand Down Expand Up @@ -894,7 +893,7 @@
"<a id=\"5\"></a>\n",
"## 5. Conclusion\n",
"\n",
"In this notebook, we have walked through the complete process of compiling TorchScript models with Torch-TensorRT for EfficientNet-B0 model and test the performance impact of the optimization. With Torch-TensorRT, we observe a speedup of **1.84x** with FP32, and **5.2x** with FP16 on an NVIDIA 3090 GPU. These acceleration numbers will vary from GPU to GPU(as well as implementation to implementation based on the ops used) and we encorage you to try out latest generation of Data center compute cards for maximum acceleration.\n",
"In this notebook, we have walked through the complete process of compiling TorchScript models with Torch-TensorRT for ResNet-50 model and test the performance impact of the optimization. With Torch-TensorRT, we observe a speedup of **1.84x** with FP32, and **5.2x** with FP16 on an NVIDIA 3090 GPU. These acceleration numbers will vary from GPU to GPU(as well as implementation to implementation based on the ops used) and we encorage you to try out latest generation of Data center compute cards for maximum acceleration.\n",
"\n",
"### What's next\n",
"Now it's time to try Torch-TensorRT on your own model. If you run into any issues, you can fill them at https://github.com/pytorch/TensorRT. Your involvement will help future development of Torch-TensorRT.\n"
Expand Down