tlc121 / FsFont

Official PaddlePaddle Implementation of Few-Shot Font Generation by Learning Fine-Grained Local Styles (FsFont)
Other
71 stars 7 forks source link

训练过程中遇到的一些问题 #24

Closed zhenzi0322 closed 1 year ago

zhenzi0322 commented 1 year ago

我在训练过程中遇到如下问题:

Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.7/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.7/dist-packages/paddle/fluid/dataloader/dataloader_iter.py", line 536, in _thread_loop
    batch = self._get_data()
  File "/usr/local/lib/python3.7/dist-packages/paddle/fluid/dataloader/dataloader_iter.py", line 674, in _get_data
    batch.reraise()
  File "/usr/local/lib/python3.7/dist-packages/paddle/fluid/dataloader/worker.py", line 172, in reraise
    raise self.exc_type(msg)
TypeError: DataLoader worker(1) caught TypeError with message:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/paddle/fluid/dataloader/worker.py", line 339, in _worker_loop
    batch = fetcher.fetch(indices)
  File "/usr/local/lib/python3.7/dist-packages/paddle/fluid/dataloader/fetcher.py", line 125, in fetch
    data.append(self.dataset[idx])
  File "/app/datasets/dataset_transformer.py", line 82, in __getitem__
    for uni in trg_unis]).unsqueeze_(1)
  File "/app/datasets/dataset_transformer.py", line 82, in <listcomp>
    for uni in trg_unis]).unsqueeze_(1)
  File "train.py", line 95, in <lambda>
    env_get = lambda env, x, y, transform: transform(read_data_from_lmdb(env, f'{x}_{y}')['img'])
TypeError: 'NoneType' object is not subscriptable

我想知道是为什么呢?