edge-connect icon indicating copy to clipboard operation
edge-connect copied to clipboard

Who can help me slove this error? (when I try to train )

Open lgl1227 opened this issue 4 years ago • 5 comments

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)

lgl1227 avatar Jan 25 '22 03:01 lgl1227

我也有这个错误,不知道您解决了没有

song201216 avatar Mar 26 '22 11:03 song201216

并没有 我现在没有在看这个代码了

lgl1227 avatar Mar 28 '22 08:03 lgl1227

谢谢,我已经解决了

------------------ 原始邮件 ------------------ 发件人: "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: @.***>

song201216 avatar Mar 28 '22 08:03 song201216

谢谢,我已经解决了 ------------------ 原始邮件 ------------------ 发件人: "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: @.***> 我也有这个问题,请问怎么解决的啊,谢谢!

Chaneky avatar Apr 03 '22 02:04 Chaneky

能不能解决一下啊

kaylahoo avatar Sep 26 '22 06:09 kaylahoo