-
Notifications
You must be signed in to change notification settings - Fork 532
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
Who can help me slove this error? (when I try to train ) #175
Comments
我也有这个错误,不知道您解决了没有 |
并没有 我现在没有在看这个代码了 |
谢谢,我已经解决了
…------------------ 原始邮件 ------------------
发件人: "Alex ***@***.***>;
发送时间: 2022年3月28日(星期一) 下午4:34
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [knazeri/edge-connect] Who can help me slove this error? (when I try to train ) (Issue #175)
并没有 我现在没有在看这个代码了
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
|
能不能解决一下啊 |
python train.py --model 1 --checkpoints ./checkpoints/celebA
Training epoch: 1
loading error: datasets/celebA/train/000195.jpg
Traceback (most recent call last):
File "E:\PycharmProject\edge-connect\src\dataset.py", line 41, in getitem
item = self.load_item(index)
File "E:\PycharmProject\edge-connect\src\dataset.py", line 71, in load_item
mask = self.load_mask(img, index)
File "E:\PycharmProject\edge-connect\src\dataset.py", line 139, in load_mask
mask_index = random.randint(0, len(self.mask_data) - 1)
File "E:\Anaconda3\lib\random.py", line 222, in randint
return self.randrange(a, b+1)
File "E:\Anaconda3\lib\random.py", line 200, in randrange
raise ValueError("empty range for randrange() (%d,%d, %d)" % (istart, istop, width))
ValueError: empty range for randrange() (0,0, 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "train.py", line 2, in
main(mode=1)
File "E:\PycharmProject\edge-connect\main.py", line 56, in main
model.train()
File "E:\PycharmProject\edge-connect\src\edge_connect.py", line 99, in train
for items in train_loader:
File "E:\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 521, in next
data = self._next_data()
File "E:\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 561, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "E:\Anaconda3\lib\site-packages\torch\utils\data_utils\fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "E:\Anaconda3\lib\site-packages\torch\utils\data_utils\fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "E:\PycharmProject\edge-connect\src\dataset.py", line 44, in getitem
item = self.load_item(0)
File "E:\PycharmProject\edge-connect\src\dataset.py", line 71, in load_item
mask = self.load_mask(img, index)
File "E:\PycharmProject\edge-connect\src\dataset.py", line 139, in load_mask
mask_index = random.randint(0, len(self.mask_data) - 1)
File "E:\Anaconda3\lib\random.py", line 222, in randint
return self.randrange(a, b+1)
File "E:\Anaconda3\lib\random.py", line 200, in randrange
raise ValueError("empty range for randrange() (%d,%d, %d)" % (istart, istop, width))
ValueError: empty range for randrange() (0,0, 0)
The text was updated successfully, but these errors were encountered: