VQ-Font icon indicating copy to clipboard operation
VQ-Font copied to clipboard

TypeError: stack(): argument 'tensors' (position 1) must be tuple of Tensors, not NoneType

Open zhenzi0322 opened this issue 7 months ago • 4 comments

训练时出现如下问题:

Traceback (most recent call last):
  File "train.py", line 220, in <module>
    main()
  File "train.py", line 216, in main
    train(args, cfg)
  File "train.py", line 209, in train
    trainer.train(trn_loader, st_step, cfg["iter"], component_objects, chars_sim_dict)
  File "/app/trainer/combined_trainer.py", line 78, in train
    out_1, style_components_1 = self.gen.read_decode(trg_style_ids, trg_sample_index,
  File "/app/model/generator.py", line 69, in read_decode
    reference_feats = self.memory.read_chars(target_style_ids, trg_sample_index, reduction=reduction)
  File "/app/model/memory.py", line 90, in read_chars
    sc_feat = read_char(style_id, sample_index, reduction)
  File "/app/model/memory.py", line 49, in read_char
    comp_feat = self.read_point(style_id, sample_index, reduction)
  File "/app/model/memory.py", line 41, in read_point
    return torch.stack(sc_feats)
TypeError: stack(): argument 'tensors' (position 1) must be tuple of Tensors, not NoneType

zhenzi0322 avatar Nov 09 '23 08:11 zhenzi0322