WSRGlow icon indicating copy to clipboard operation
WSRGlow copied to clipboard

Having Trouble in training: utils.tensors_to_scalars

Open jc5201 opened this issue 3 years ago • 3 comments

Hello, I'm trying to run your code. I just ran train.py with commands in readme, (with additional argument --hparams work_dir=ccc). But faced this error.

File "train.py", line 143, in training_step log_outputs = utils.tensors_to_scalars(log_outputs) AttributeError: module 'utils' has no attribute 'tensors_to_scalars'

I looked over commit logs, but utils.py never had that function.

jc5201 avatar Sep 27 '21 17:09 jc5201

tensors_to_scalars looks not necessary. It is already a dictionary of scalars.

However, WaveGlowTask4 seems not valid. Many methods including on_pre_performance_check or on_post_performance_check not exist.

jc5201 avatar Sep 29 '21 05:09 jc5201

AttributeError: module 'utils' has no attribute 'tensors_to_scalars' Epoch 1: : 0batch [00:02, ?batch/s]

EdisonZhu33 avatar Aug 25 '23 09:08 EdisonZhu33

I tried to replace log_outputs = utils.tensors_to_scalars(log_outputs) with for k, v in log_outputs.items(): if isinstance(v, torch.Tensor): v = v.item()

yxlu-0102 avatar Nov 03 '23 02:11 yxlu-0102