[英]Python PyTorch Error: ModuleNotFoundError: No module named 'torch.utils.tensorboard'
I'm coding in Python on a Jupyter Notebook (Python 3) on Windows, and I've installed PyTorch and TensorBoard.我在 Windows 上的 Jupyter Notebook (Python 3) 上的 Python 中进行编码,并且我已经安装了 PyTorch 和 TensorBoard。 My problem is that i'm getting this error message:
我的问题是我收到此错误消息:
ModuleNotFoundError: No module named 'torch.utils.tensorboard'
I've already tried to use pip install future
but the error remains, how can I fix this?我已经尝试使用
pip install future
但错误仍然存在,我该如何解决这个问题?
Here's how I'm importing torch.utils.tensorboard
这是我导入
torch.utils.tensorboard
的方式
from torch.utils.tensorboard import SummaryWriter
Use pip install tensorboard or pip3 install tensorboard
OR pip install --upgrade tensorboard && pip install --upgrade torch
使用
pip install tensorboard or pip3 install tensorboard
或pip install --upgrade tensorboard && pip install --upgrade torch
You need to reinstall with the torch version below:您需要使用以下火炬版本重新安装:
pip3 install torch==1.4.0
Guess you are running on a machine w/o GPU device.猜猜你在没有 GPU 设备的机器上运行。 usually you need pytorch with GPU version to achieve tensorboard import in torch.utils
通常你需要 pytorch 和 GPU 版本来实现torch.utils中的tensorboard导入
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.