【发布时间】:2019-08-26 12:58:18
【问题描述】:
我正在关注聊天机器人的教程:https://pytorch.org/tutorials/beginner/chatbot_tutorial.html
我有 Windows 10。
import torch #works
但以下导入不起作用:
import torch.nn
import torch.jit
错误:
no module named torch.nn found和
No module named torch.jit found
我在 anaconda 中安装了以下内容:
conda install pytorch-cpu torchvision-cpu -c pytorch
我应该怎么做才能消除错误
代码是:
import torch
from torch.jit import script, trace
import torch.nn as nn
from torch import optim
import torch.nn.functional as F
【问题讨论】:
-
您最终找到了解决方案或解决方法吗?
-
不,我结束了你使用 colab
标签: python-3.x chatbot recurrent-neural-network torch