-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot import name '_accumulate' from 'torch._utils' #1243
Comments
Just ran into the same problem. Pytorch v2.3.0 no longer defines function
So, either find and downgrade to an older version of Pytorch such as
|
conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch use this torch version with 11.3 toolkit and remove the troch and torchvision from requirements and then install the req. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want finetune model, and when i use trainer.ipynb i get this error `ImportError Traceback (most recent call last)
Cell In[1], line 4
2 import torch.backends.cudnn as cudnn
3 import yaml
----> 4 from train import train
5 from utils import AttrDict
6 import pandas as pd
File ~/pet/pcb/EasyOCR/trainer/train.py:15
12 import numpy as np
14 from utils import CTCLabelConverter, AttnLabelConverter, Averager
---> 15 from dataset import hierarchical_dataset, AlignCollate, Batch_Balanced_Dataset
16 from model import Model
17 from test import validation
File ~/pet/pcb/EasyOCR/trainer/dataset.py:13
11 import numpy as np
12 from torch.utils.data import Dataset, ConcatDataset, Subset
---> 13 from torch._utils import _accumulate
14 import torchvision.transforms as transforms
16 def contrast_grey(img):
ImportError: cannot import name '_accumulate' from 'torch._utils' (/home/simba9/anaconda3/envs/easyocr/lib/python3.9/site-packages/torch/_utils.py)`
The text was updated successfully, but these errors were encountered: