# Efficientdet conversion from onnx to tensorrt engine freeze

**URL:** <https://forums.developer.nvidia.com/t/efficientdet-conversion-from-onnx-to-tensorrt-engine-freeze/211472>\
**Category:** TensorRT\
**Created:** [April 18, 2022, 3:18am UTC](https://forums.developer.nvidia.com/t/efficientdet-conversion-from-onnx-to-tensorrt-engine-freeze/211472 "2022-04-18T03:18:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sasuketaichou](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sasuketaichou](https://forums.developer.nvidia.com/u/sasuketaichou)\
**Post date:** [April 18, 2022, 3:18am UTC](https://forums.developer.nvidia.com/t/efficientdet-conversion-from-onnx-to-tensorrt-engine-freeze/211472/1 "2022-04-18T03:18:53Z")

</div>

## Description

Running example from this [Github](https://github.com/NVIDIA/TensorRT/tree/main/samples/python/efficientdet)

Freezing on the same spot in the last shown log. I am able to make it work using a workstation that using a quadro gpu.

## Environment

**TensorRT Version** : 8202  
**GPU Type** : RTX 3070  
**Nvidia Driver Version** : 511.65  
**CUDA Version** : 11.6  
**CUDNN Version** : 8.3.2  
**Operating System + Version** : ubuntu20.04 (windows 11 wsl)  
**Python Version (if applicable)**: 3.8  
**TensorFlow Version (if applicable)**: 2.7.0  
**PyTorch Version (if applicable)**:  
**Baremetal or Container (if container which image + tag)**: [nvcr.io/nvidia/tensorflow:22.01-tf2-py3](http://nvcr.io/nvidia/tensorflow:22.01-tf2-py3)

## Relevant Files

Log:  
[freeze.log](https://forums.developer.nvidia.com/uploads/short-url/1y9YaOzW5AH9Dwg9ACZ7nLt6RxJ.log) (4.3 MB)

Onnx :  
[model.onnx](https://forums.developer.nvidia.com/uploads/short-url/jLMVomvswKjSOywD5Rhqxwx2AUU.onnx) (16.1 MB)

## Steps To Reproduce

> #!/bin/bash  
> INPUT\_SHAPE=8x512x512x3  
> trtexec   
> –onnx=model/onnx-model/model.onnx   
> –saveEngine=model/trt-model/engine.trt   
> –optShapes=input:$INPUT\_SHAPE   
> –workspace=8000   
> –verbose

---

<div class="post-metadata">

**Author:** ![NVES](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/nves/32/14043_2.png) [@NVES](https://forums.developer.nvidia.com/u/NVES)\
**Post date:** [April 18, 2022, 3:37am UTC](https://forums.developer.nvidia.com/t/efficientdet-conversion-from-onnx-to-tensorrt-engine-freeze/211472/2 "2022-04-18T03:37:47Z")

</div>

Hi,  
Request you to share the ONNX model and the script if not shared already so that we can assist you better.  
Alongside you can try few things:

> **[Quick Start Guide — NVIDIA TensorRT](https://docs.nvidia.com/deeplearning/tensorrt/latest/getting-started/quick-start-guide.html)**

1. validating your model with the below snippet

# check\_model.py

import sys  
import onnx  
filename = yourONNXmodel  
model = onnx.load(filename)  
onnx.checker.check\_model(model).  
2) Try running your model with trtexec command.

> **[TensorRT/samples/trtexec at master · NVIDIA/TensorRT](https://github.com/NVIDIA/TensorRT/tree/master/samples/trtexec)**
>
> NVIDIA® TensorRT™ is an SDK for high-performance deep learning inference on NVIDIA GPUs. This repository contains the open source components of TensorRT. - NVIDIA/TensorRT

In case you are still facing issue, request you to share the trtexec “”–verbose"" log for further debugging  
Thanks!

---

<div class="post-metadata">

**Author:** ![spolisetty](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/spolisetty/32/14047_2.png) [@spolisetty](https://forums.developer.nvidia.com/u/spolisetty)\
**Post date:** [April 19, 2022, 5:47am UTC](https://forums.developer.nvidia.com/t/efficientdet-conversion-from-onnx-to-tensorrt-engine-freeze/211472/4 "2022-04-19T05:47:15Z")

</div>

Hi,

We recommend you to please use the latest TensorRT version 8.4.  
Using the latest TRT version, we could successfully generate the TRT engine.  
[https://developer.nvidia.com/nvidia-tensorrt-8x-download](https://developer.nvidia.com/nvidia-tensorrt-8x-download)

> **[Installation Guide :: NVIDIA Deep Learning TensorRT Documentation](https://docs.nvidia.com/deeplearning/tensorrt/install-guide/index.html#upgrading)**
>
> This NVIDIA TensorRT 8.4.1 Installation Guide provides the installation requirements, a list of what is included in the TensorRT package, and step-by-step instructions for installing TensorRT.

Thank you.

---

<div class="post-metadata">

**Author:** ![sasuketaichou](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sasuketaichou](https://forums.developer.nvidia.com/u/sasuketaichou)\
**Post date:** [April 20, 2022, 5:25am UTC](https://forums.developer.nvidia.com/t/efficientdet-conversion-from-onnx-to-tensorrt-engine-freeze/211472/5 "2022-04-20T05:25:55Z")

</div>

Hi,

Ive tried the solution by using version 8.4, it still freeze. Tested by using windows zip installation on windows 11

update: after clear and kill some background process that using gpu resources, manage to make it work.

update2: another go with wsl, checkout latest, make using dockerfile provide by the repo instead of pulling from nvidia catalog, still freeze as the same spot as provided log

---

<div class="post-metadata">

**Author:** ![spolisetty](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/spolisetty/32/14047_2.png) [@spolisetty](https://forums.developer.nvidia.com/u/spolisetty)\
**Post date:** [April 26, 2022, 10:47am UTC](https://forums.developer.nvidia.com/t/efficientdet-conversion-from-onnx-to-tensorrt-engine-freeze/211472/6 "2022-04-26T10:47:01Z")

</div>

Hi,

We couldn’t reproduce the same error. We could successfully build the TRT engine.  
Have you tried increasing workspace?  
Could you please share with us Dockerfile to try from our end.

Thank you.

---

<div class="post-metadata">

**Author:** ![sasuketaichou](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sasuketaichou](https://forums.developer.nvidia.com/u/sasuketaichou)\
**Post date:** [May 5, 2022, 3:20pm UTC](https://forums.developer.nvidia.com/t/efficientdet-conversion-from-onnx-to-tensorrt-engine-freeze/211472/7 "2022-05-05T15:20:28Z")

</div>

as mention, ive been using a container provide by nvidia but they didnt share the dockerfile, u need to pull this [http://nvcr.io/nvidia/tensorflow:22.01-tf2-py3](http://nvcr.io/nvidia/tensorflow:22.01-tf2-py3)

but ive build another container suggest by official tensor rt repo and get the same freeze result, here is the shared dockerfile [TensorRT/ubuntu-20.04.Dockerfile at main · NVIDIA/TensorRT · GitHub](https://github.com/NVIDIA/TensorRT/blob/main/docker/ubuntu-20.04.Dockerfile)
