Created
November 21, 2017 23:58
-
-
Save colesbury/26adb3168d5d2bbf551c4009a60783aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/autograd.cpp b/autograd.cpp | |
index aa849d6..5c3896b 100644 | |
--- a/autograd.cpp | |
+++ b/autograd.cpp | |
@@ -9,7 +9,7 @@ tag::Engine engine; | |
void backward(Variable loss, bool keep_graph) { | |
tag::function_list funclst; | |
funclst.emplace_back(loss.grad_fn(), loss.output_nr()); | |
- detail::engine.execute(funclst, {Var(at::ones_like(loss.data()))}, false); | |
+ detail::engine.execute(funclst, {Var(at::ones_like(loss.data()), false, true)}, false); | |
} | |
std::unordered_map<std::string, Variable> ContainerImpl::parameters() { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment