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

Training mode is not persisted after tracing #632

Open
dfalbel opened this issue Aug 2, 2021 · 0 comments · May be fixed by #633
Open

Training mode is not persisted after tracing #632

dfalbel opened this issue Aug 2, 2021 · 0 comments · May be fixed by #633

Comments

@dfalbel
Copy link
Member

dfalbel commented Aug 2, 2021

library(torch)
model <- nn_sequential(
  nn_linear(10, 10),
  nn_relu(),
  nn_dropout(),
  nn_linear(10, 1)
)

model$eval()
model$training
#> [1] FALSE
test_model <- jit_trace(model, torch_randn(10, 10)) 
test_model$training
#> [1] TRUE

I think this is related to #620

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

Successfully merging a pull request may close this issue.

1 participant