Deep_Metric icon indicating copy to clipboard operation
Deep_Metric copied to clipboard

TypeError: unsupported format string passed to Variable.__format__

Open zyyhl opened this issue 5 years ago • 3 comments

Traceback (most recent call last): File "train.py", line 207, in main(parser.parse_args()) File "train.py", line 121, in main optimizer=optimizer, train_loader=train_loader, args=args) File "/home/user/2T-G/zyy/Deep_metric-master/trainer.py", line 62, in train loss=losses, accuracy=accuracy, pos=pos_sims, neg=neg_sims)) TypeError: unsupported format string passed to Variable.format I have encountered the above problem, can you help me solve it? Thanks

zyyhl avatar Mar 12 '19 06:03 zyyhl

which version of pytorch do you use?

bnu-wangxun avatar Mar 12 '19 14:03 bnu-wangxun

my version of pytorch is 0.2

zyyhl avatar Mar 13 '19 01:03 zyyhl

The code have already update to pytorch 1.0, you may first try to update your pytorch to 1.0 version, and then to find whether the problem still exists.

bnu-wangxun avatar Mar 13 '19 03:03 bnu-wangxun