from config import opt
import os
import torch as t
import sys
sys.path.append("E:/desktop project/pytorch-code/chapter06-best_practice/models/resnet34.py")
from models.resnet34 import ResNet34
from data.dataset import DogCat
from torch.utils.data import DataLoader
from torchnet import meter
from utils.visualize import Visualizer
from tqdm import tqdm
报错:
(base) E:\desktop project\pytorch-code\chapter06-best_practice>python main.py train --train-data-root=./data/train --use-gpu --env=classifier
Traceback (most recent call last):
File "main.py", line 8, in
from models.resnet34 import ResNet34
File "E:\desktop project\pytorch-code\chapter06-best_practice\models__init__.py", line 2, in
from resnet34 import ResNet34
ModuleNotFoundError: No module named 'resnet34'
coding:utf-8
from config import opt import os import torch as t
import sys sys.path.append("E:/desktop project/pytorch-code/chapter06-best_practice/models/resnet34.py") from models.resnet34 import ResNet34
from data.dataset import DogCat from torch.utils.data import DataLoader from torchnet import meter from utils.visualize import Visualizer from tqdm import tqdm
报错: (base) E:\desktop project\pytorch-code\chapter06-best_practice>python main.py train --train-data-root=./data/train --use-gpu --env=classifier Traceback (most recent call last): File "main.py", line 8, in
from models.resnet34 import ResNet34
File "E:\desktop project\pytorch-code\chapter06-best_practice\models__init__.py", line 2, in
from resnet34 import ResNet34
ModuleNotFoundError: No module named 'resnet34'
![图片](https://user-images.githubusercontent.com/63643933/90703998-dc407a00-e2c1-11ea-8981-72749ea135ba.png)