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
diff options
context:
space:
mode:
authorMarcin Junczys-Dowmunt <junczys@amu.edu.pl>2017-06-06 04:01:11 +0300
committerMarcin Junczys-Dowmunt <junczys@amu.edu.pl>2017-06-06 04:01:11 +0300
commite7492668e337c9ff824ed286b9d768f2ff3a8d02 (patch)
tree4b0edddca4fdcfbe10fa9794fe5cfa212be93c25 /scripts
parente1569e391e9741a5b08af017c3d210ecdb86e31b (diff)
fix averaging script
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/average.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/average.py b/scripts/average.py
index 70054d9f..e66e99dc 100755
--- a/scripts/average.py
+++ b/scripts/average.py
@@ -22,11 +22,12 @@ for filename in args.model:
if k != "history_errs":
if k not in average:
average[k] = m[k]
- elif average[k].shape == m[k].shape:
+ elif average[k].shape == m[k].shape and "special" not in k:
average[k] += m[k]
for k in average:
- average[k] /= n
+ if "special" not in k:
+ average[k] /= n
print "Saving to", args.output
np.savez(args.output, **average)