Closed adaxidedakaonang closed 5 years ago
问题出现在progress_bar.py文件中的update函数fps = self.completed / elapsed这里elapsed变成零了。我把elapsed = time.time() - self.start_time中的两个值打印出来发现是一样的: Read images... [ ] 0/36352, elapsed: 0s, ETA: Start... 1554711715.5890906 1554711715.5890906 0.0 Traceback (most recent call last): File "create_lmdb.py", line 22, in pbar.update('Read {}'.format(v)) File "D:\code\BasicSR\codes\utils\progress_bar.py", line 43, in update fps = self.completed / elapsed ZeroDivisionError: float division by zero 其中我的路径设置是这样的: img_folder = 'D:\code\BasicSR\codes\data\HR\*.png' lmdb_save_path = 'D:\code\BasicSR\codes\data\HR.lmdb' 需要您的帮助!谢谢
fps = self.completed / elapsed
elapsed = time.time() - self.start_time
抱歉这个问题应该在BasicSR中
If the problem arises from the pbar, you can just comment these lines, which will not influence its function.
It works, thank you.感谢
问题出现在progress_bar.py文件中的update函数
pbar.update('Read {}'.format(v))
File "D:\code\BasicSR\codes\utils\progress_bar.py", line 43, in update
fps = self.completed / elapsed
ZeroDivisionError: float division by zero
其中我的路径设置是这样的:
img_folder = 'D:\code\BasicSR\codes\data\HR\*.png'
lmdb_save_path = 'D:\code\BasicSR\codes\data\HR.lmdb'
需要您的帮助!谢谢
fps = self.completed / elapsed
这里elapsed变成零了。我把elapsed = time.time() - self.start_time
中的两个值打印出来发现是一样的: Read images... [ ] 0/36352, elapsed: 0s, ETA: Start... 1554711715.5890906 1554711715.5890906 0.0 Traceback (most recent call last): File "create_lmdb.py", line 22, in