Skip to content

还有个bug,在使用LOSO.py训练时,在trainer.py中有两个参数best_acc1 = 0和best_f1 = 0(在72行)。应当把这两参数放在def trainer里面。而且要放在global best_acc1和global best_f1下面赋值,不然会报错。如果不把这两个参数(best_acc1 = 0和best_f1 = 0)放在def trainer里面,当有一个sub因为准确率达到100%退出训练时,接下来所有的sub都会因为best_acc1没有被赋值为0,而是接着上一个100%而退出训练。最终所有的sub都会只训练一次。 #3

@yinlu0221

Description

@yinlu0221
          还有个bug,在使用LOSO.py训练时,在trainer.py中有两个参数best_acc1 = 0和best_f1 = 0(在72行)。应当把这两参数放在def trainer里面。而且要放在global best_acc1和global best_f1下面赋值,不然会报错。如果不把这两个参数(best_acc1 = 0和best_f1 = 0)放在def  trainer里面,当有一个sub因为准确率达到100%退出训练时,接下来所有的sub都会因为best_acc1没有被赋值为0,而是接着上一个100%而退出训练。最终所有的sub都会只训练一次。

Originally posted by @whiteany in #2 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions