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

为什么不使用model.eval() #10

Open
chanyikchong opened this issue Oct 21, 2021 · 0 comments
Open

为什么不使用model.eval() #10

chanyikchong opened this issue Oct 21, 2021 · 0 comments

Comments

@chanyikchong
Copy link

chanyikchong commented Oct 21, 2021

在sent_to_vec中你使用torch.no_grad的方式来计算输出向量,为什么不加上model.eval()的方式计算?如果模型中有dropout或者normalize的话两种方式计算出来的向量是不一样的。

@chanyikchong chanyikchong changed the title 为什么使用torch.no_grad()而不是model.eval() 为什么不使用model.eval() Oct 21, 2021
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

1 participant