AI成长之路--pytorch的eval

    科技2022-07-11  126

    AI成长之路--pytorch的eval

    在训练完模型后,要调用模型的eval(),否则的话,有输入数据,即使不训练,它也会改变权值。(这样就导致测试结果不对) 这是model中含有batch normalization层所带来的的性质。

    转载:https://blog.csdn.net/qq_38241346/article/details/106564713?ops_request_misc=%7B%22request%5Fid%22%3A%22160171296319195188324932%22%2C%22scm%22%3A%2220140713.130102334.pc%5Fall.%22%7D&request_id=160171296319195188324932&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allfirst_rank_ecpm_v3~pc_rank_v2-2-106564713.first_rank_ecpm_v3_pc_rank_v2&utm_term=torch的eval&spm=1018.2118.3001.4187

    Processed: 0.009, SQL: 8