Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/marian.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcin Junczys-Dowmunt <junczys@amu.edu.pl>2016-05-04 01:17:09 +0300
committerMarcin Junczys-Dowmunt <junczys@amu.edu.pl>2016-05-04 01:17:09 +0300
commit437863be388925cdbc0ab9bbb020af6230d9634e (patch)
treea06bdb94a56378f7d8fd4dcf12fee9315135cd9c /src
parentad853351ccf4716114f51086615ed23970b9ca18 (diff)
in loop
Diffstat (limited to 'src')
-rwxr-xr-xsrc/a.outbin183343 -> 199184 bytes
-rw-r--r--src/test.cpp2
2 files changed, 1 insertions, 1 deletions
diff --git a/src/a.out b/src/a.out
index d848b3c9..ebfbbce5 100755
--- a/src/a.out
+++ b/src/a.out
Binary files differ
diff --git a/src/test.cpp b/src/test.cpp
index 293319e1..147f9015 100644
--- a/src/test.cpp
+++ b/src/test.cpp
@@ -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();