• pytorchvision安装问题


    问题1:找不到cuda库

    Traceback (most recent call last):
      File "cnn.py", line 5, in <module>
        import torchvision
      File "/workspace/jfyuan/tools/espnet/tools/venv/lib/python3.7/site-packages/torchvision/__init__.py", line 1, in <module>
        from torchvision import models
      File "/workspace/jfyuan/tools/espnet/tools/venv/lib/python3.7/site-packages/torchvision/models/__init__.py", line 11, in <module>
        from . import detection
      File "/workspace/jfyuan/tools/espnet/tools/venv/lib/python3.7/site-packages/torchvision/models/detection/__init__.py", line 1, in <module>
        from .faster_rcnn import *
      File "/workspace/jfyuan/tools/espnet/tools/venv/lib/python3.7/site-packages/torchvision/models/detection/faster_rcnn.py", line 7, in <module>
        from torchvision.ops import misc as misc_nn_ops
      File "/workspace/jfyuan/tools/espnet/tools/venv/lib/python3.7/site-packages/torchvision/ops/__init__.py", line 1, in <module>
        from .boxes import nms, box_iou
      File "/workspace/jfyuan/tools/espnet/tools/venv/lib/python3.7/site-packages/torchvision/ops/boxes.py", line 2, in <module>
        from torchvision import _C
    ImportError: /workspace/jfyuan/pytorch/sample/cnn/libs/libcudart.so.9.0: version `libcudart.so.9.0' not found (required by
    

    原因:pytorch是1.3.1,pytorchvision安装的0.3.0,版本不对应导致的

    解决:pip install torchvision==0.4.2

  • 相关阅读:
    [LeetCode] Walls and Gates
    [LeetCode] Expression Add Operators
    [LeetCode] Inorder Successor in BST
    [LeetCode] Peeking Iterator
    [CTCI] 最小调整有序
    [LeetCode] Single Number III
    [LeetCode] Zigzag Iterator
    [LeetCode] Wiggle Sort
    android 设颜色透明值
    android android BitmapFactory报错OOM
  • 原文地址:https://www.cnblogs.com/tibetanmastiff/p/13496891.html
Copyright © 2020-2023  润新知