Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: unsupported format string passed to Variable.__format__ #25

Open
zyyhl opened this issue Mar 12, 2019 · 3 comments
Open

TypeError: unsupported format string passed to Variable.__format__ #25

zyyhl opened this issue Mar 12, 2019 · 3 comments

Comments

@zyyhl
Copy link

zyyhl commented Mar 12, 2019

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

@bnu-wangxun
Copy link
Owner

which version of pytorch do you use?

@zyyhl
Copy link
Author

zyyhl commented Mar 13, 2019

my version of pytorch is 0.2

@bnu-wangxun
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants