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.train() setting #18

Closed
GlancerZ opened this issue Mar 15, 2023 · 1 comment
Closed

model.train() setting #18

GlancerZ opened this issue Mar 15, 2023 · 1 comment

Comments

@GlancerZ
Copy link

GlancerZ commented Mar 15, 2023

Why do you use model.train in the inference part (encode batch)?

@jsxlei
Copy link
Owner

jsxlei commented Mar 15, 2023

Thank you for your interest. Here, model.train means using data-specific mean and var in the batch_norm, otherwise it will use the mean and var from the training data. Anyway, the model.train or model.eval does not make big difference.

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