glenn-jocher commited on
Commit
3eefab1
·
unverified ·
1 Parent(s): 014acde

Remove `tensorrt` pip install check (#7439)

Browse files
Files changed (1) hide show
  1. export.py +1 -2
export.py CHANGED
@@ -209,8 +209,7 @@ def export_coreml(model, im, file, prefix=colorstr('CoreML:')):
209
  def export_engine(model, im, file, train, half, simplify, workspace=4, verbose=False, prefix=colorstr('TensorRT:')):
210
  # YOLOv5 TensorRT export https://developer.nvidia.com/tensorrt
211
  try:
212
- check_requirements(('tensorrt',))
213
- import tensorrt as trt
214
 
215
  if trt.__version__[0] == '7': # TensorRT 7 handling https://github.com/ultralytics/yolov5/issues/6012
216
  grid = model.model[-1].anchor_grid
 
209
  def export_engine(model, im, file, train, half, simplify, workspace=4, verbose=False, prefix=colorstr('TensorRT:')):
210
  # YOLOv5 TensorRT export https://developer.nvidia.com/tensorrt
211
  try:
212
+ import tensorrt as trt # pip install -U nvidia-tensorrt --index-url https://pypi.ngc.nvidia.com
 
213
 
214
  if trt.__version__[0] == '7': # TensorRT 7 handling https://github.com/ultralytics/yolov5/issues/6012
215
  grid = model.model[-1].anchor_grid