ethnhe/FFB6D

Error in test_ycb and test_lm

Opened this issue · 2 comments

After downloading and installing I just run the demo and test files.

I encounter the following error:

Traceback (most recent call last):
  File "train_lm.py", line 686, in <module>
    train()
  File "train_lm.py", line 667, in train
    val_loss, res = trainer.eval_epoch(
  File "train_lm.py", line 404, in eval_epoch
    seg_res_fn += '_%s%.2f' % (k, v)
TypeError: must be real number, not list

#50 in this issue there is no fix provided

??? is this a valid fix ??? :
seg_res_fn += '_%s%.2f' % (k, np.array(v).mean() * 100)

cause otherwise the filename of the log file will be endlessly ?

This is what I am implementing while dealing with this during both training and testing phases.
However is anyone can provide a definite answer or explanation it would help. I do not understand the dimensions of involved list personally.

maby you can edit on train.py,you can try to edit 'print(k,v[0])' instead of 'print(k, v)'