clovaai/lffont

KeyError: '71FC'

typeface-cn opened this issue · 3 comments

(base) D:\lffont>python train.py stkb2jingji1 ./cfgs/custom.yaml ./cfgs/combined.yaml
failed to import apex
INFO::08/25 18:03:41 | Run Argv:
> train.py stkb2jingji1 ./cfgs/custom.yaml ./cfgs/combined.yaml
INFO::08/25 18:03:41 | Args:
name            = stkb2jingji1
config_paths    = ['./cfgs/custom.yaml', './cfgs/combined.yaml']
resume          = None
use_unique_name = False
INFO::08/25 18:03:41 | Configs:
use_half: False
half_type: O2
use_ddp: False
port: 7890
phase: comb
overwrite: False
work_dir: result
batch_size: 8
comb_iter: 800000
fact_iter: 50000
seed: 2
g_lr: 0.0002
d_lr: 0.0008
ac_lr: 0.0002
n_workers: 0
adam_betas:
  - 0.0
  - 0.9
init: kaiming
n_comps: 371
n_in_chars: 3
n_each_chars: 3
n_targets: 9
n_shots: 8
content_font: font1
language: chn
data_path: ./data/stkb2jingji
data_meta: ./data/stkb2jingji_train.json
dec_dict: meta/chn_decompose.json
dset_args:
  n_sample_min: 3
  n_sample_max: 5
dset_aug:
  normalize: True
  random_affine: False
cv_n_unis: 30
cv_n_fonts: 10
C: 32
g_args:
  comp_enc:
    norm: in
    activ: relu
    pad_type: zero
    skip_scale_var: False
    sigmoid: True
  emb_block:
    emb_dim: None
  dec:
    norm: IN
    activ: relu
    pad_type: zero
    out: sigmoid
  content_enc:
    C_out: 256
    content_sigmoid: False
    norm: in
d_args:
  w_norm: spectral
  activ: relu
  gap_activ: relu
  pad_type: zero
  res_scale_var: False
ac_args:
  norm: IN
  activ: relu
  pad_type: zero
  conv_dropout: 0.3
  clf_dropout: 0.2
pixel_loss_type: l1
pixel_w: 0.1
gan_w: 1.0
fm_layers: all
fm_w: 1.0
ac_w: 0.1
ac_gen_w: 0.1
dec_const_w: 0.0
save: all-last
print_freq: 1000
val_freq: 10000
save_freq: 10000
tb_freq: 100
unique_name: stkb2jingji1
name: stkb2jingji1
gpu: -1
INFO::08/25 18:03:41 | Unique name: stkb2jingji1
INFO::08/25 18:03:41 | Get dataset ...
INFO::08/25 18:03:41 | Build model ...
INFO::08/25 18:03:42 | Start training ...
Traceback (most recent call last):
  File "D:\lffont\train.py", line 253, in <module>
    main()
  File "D:\lffont\train.py", line 249, in main
    train(args, cfg)
  File "D:\lffont\train.py", line 235, in train
    trainer.train(trn_loader, st_step, cfg[f"{cfg.phase}_iter"])
  File "D:\lffont\trainer\combined_trainer.py", line 54, in train
    for (in_style_ids, in_comp_ids, in_imgs,
  File "D:\lffont\datasets\datautils.py", line 12, in cyclize
    for x in loader:
  File "C:\ProgramData\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 652, in __next__
    data = self._next_data()
  File "C:\ProgramData\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 692, in _next_data
    data = self._dataset_fetcher.fetch(index)  # may raise StopIteration
  File "C:\ProgramData\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 "C:\ProgramData\Anaconda3\lib\site-packages\torch\utils\data\_utils\fetch.py", line 49, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "D:\lffont\datasets\p1dataset.py", line 93, in __getitem__
    trg_unis, trg_comp_ids = self.get_available_combinations(avail_unis, style_comp_ids)
  File "D:\lffont\datasets\p1dataset.py", line 66, in get_available_combinations
    comps = self.decompose_dict[uni]
KeyError: '71FC'

Have you solved the problem? I also have this problem.

It seems a duplicate issue with #22 (comment)
Please check the issue, and please let me know if you still have the same issue

Closing the issue, assuming the answer resolves the problem.
Please re-open the issue as necessary.