【发布时间】:2021-09-02 22:33:43
【问题描述】:
我一直在尝试使用 torch 基准测试模块来分析代码。已验证所有必需的导入均已到位:
import torch
import torchvision
import torch.utils.benchmark
另外,这些是安装的版本:
torch -> 1.4.0
torchvision -> 0.2.1
tensorflow -> 1.12.0
tensorflow-gpu -> 1.12.0
tensorboard -> 2.5.0
但我仍然收到错误:ModuleNotFoundError: No module named 'torch.utils.benchmark' 在导入 torch.utils.benchmark 时。根本原因可能是什么?
【问题讨论】:
标签: python python-3.x pytorch tensorboard torchvision