Unverified 提交 3eefab1b authored 作者: Glenn Jocher's avatar Glenn Jocher 提交者: GitHub

Remove `tensorrt` pip install check (#7439)

上级 014acde7
...@@ -209,8 +209,7 @@ def export_coreml(model, im, file, prefix=colorstr('CoreML:')): ...@@ -209,8 +209,7 @@ def export_coreml(model, im, file, prefix=colorstr('CoreML:')):
def export_engine(model, im, file, train, half, simplify, workspace=4, verbose=False, prefix=colorstr('TensorRT:')): def export_engine(model, im, file, train, half, simplify, workspace=4, verbose=False, prefix=colorstr('TensorRT:')):
# YOLOv5 TensorRT export https://developer.nvidia.com/tensorrt # YOLOv5 TensorRT export https://developer.nvidia.com/tensorrt
try: try:
check_requirements(('tensorrt',)) import tensorrt as trt # pip install -U nvidia-tensorrt --index-url https://pypi.ngc.nvidia.com
import tensorrt as trt
if trt.__version__[0] == '7': # TensorRT 7 handling https://github.com/ultralytics/yolov5/issues/6012 if trt.__version__[0] == '7': # TensorRT 7 handling https://github.com/ultralytics/yolov5/issues/6012
grid = model.model[-1].anchor_grid grid = model.model[-1].anchor_grid
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论