This commit is contained in:
Marcin Junczys-Dowmunt 2016-05-03 23:17:09 +01:00
parent ad853351cc
commit 437863be38
2 changed files with 1 additions and 1 deletions

BIN
src/a.out

Binary file not shown.

View File

@ -11,6 +11,7 @@ int main(int argc, char** argv) {
size_t max = rand() % 20 + 1;
Var x0 = 1, x1 = 2, x2 = 3;
std::vector<Var> x = { x0, x1, x2 };
Var y = 0.0;
for(int i = 0; i < max; i++) {
@ -19,7 +20,6 @@ int main(int argc, char** argv) {
x.push_back(xi);
}
std::vector<Var> x = { x0, x1, x2 };
set_zero_all_adjoints();
y.grad();