关于使用TensorRT进行深度模型加速的一些问题
发布日期:2021-05-14 15:19:55 浏览次数:19 分类:精选文章

本文共 2665 字,大约阅读时间需要 8 分钟。

������������TensorRT���������������������������������������

TensorRT������������������������������Inference���������������������������������������������������������������������TensorRT���CPU���GPU���������������������10���������������������������

TensorRT���������������������������������������������������������������

���������TensorRT���������������������������������int8���FP16������������������������������������������������������������������������float���double���������������������������������������������������������������������������������������������������������������������������int8������������������������������������������

���������TensorRT������GPU������������������������������������������������������������������������������bias+conv+relu��������������� ���������������������������������������������������������������������������������������GPU������������������������������������������������������������������

������TensorRT���������������������������

���������Python������������TensorRT������������������������������PyCuD���PyCUDA������������������PyTorch���������������������������������������������������������������

  • ���home��������������������������� tensorrt_tar ������������������TensorRT���������������������������������������������������

  • ���TensorRT���lib������������������������������LD_LIBRARY_PATH���������������������������

  • export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root/tensorrt_tar/TensorRT-*/lib

    1. ������pip������TensorRT Python���������������������������
    2. pip install tensorrt-5.0.2.6-py2.py3-none-any.whl

      1. ������������������TensorFlow���������������������UFF���������������������������������������
      2. cd TensorRT-5.0.2.6/uff

        pip install uff-0.5.5-py2.py3-none-any.whl

        1. ������������������������������������������������������GraphSurgeon������������������������������
        2. cd TensorRT-5.0.2.6/graphsurgeon

          ������������������������������������������������������TensorRT���������������������

          import tensorrt as trtimport uff

          ������������TensorRT������������������������������������

        3. ���TensorFlow���������������_pb���������������

        4. ������convert_to_uff���������TensorFlow���������������UFF���������������������������

        5. python3.5 /usr/lib/python3.5/dist-packages/uff/bin/convert_to_uff.py --input_file models/lenet5.pb

          ������������������UFF���������������������models���������������������lenet5.uff���

          ������PyTorch������������������������������������������������

        6. ���PyTorch������������ONNX���������������������

        7. ������TensorRT Runtime Engine������������������������������������������������������������������������������������������������������������������������������

        8. ���������������������������������������������������������������������������������������

    上一篇:python实现栈
    下一篇:深度模型剪枝问题

    发表评论

    最新留言

    不错!
    [***.144.177.141]2025年04月07日 23时37分41秒

    关于作者

        喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
    -- 愿君每日到此一游!

    推荐文章