PS: This article is mainly used for self collation and summary. The code involved has been successfully run on my computer. I’m not honored if I happen to help you Mark>
when I run the baseline of a competition, this importerror: cannot import name 'totensor'
error appears, The solution is as follows:
the error reporting statement is defined in my code as follows: from evaluations.python import totensor
first, it should be changed to: from evaluations.python.transforms import totensor
then a new problem appears when running
According to its tips, I revised the versions of evaluations, that is, PIP install evaluations = = 0.5.2
, and finally solved the problem.