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-04-05 12:58:15 +0300
committerMarcin Junczys-Dowmunt <junczys@amu.edu.pl>2017-04-05 12:58:15 +0300
commitfdb4fa4c92eab1d90062144ef57e1ce970067c6b (patch)
tree16ded9eff53b0b0d4b4245e0ea721edd6ee74f40 /src/amun/cpu/dl4mt/decoder.h
parentdafd15d9a52bade8ba13295f8e040788e19860e3 (diff)
parent0097387283ec3c934317233aa94c7c477a4d5982 (diff)
Merge branch 'master' into marian-integration
Diffstat (limited to 'src/amun/cpu/dl4mt/decoder.h')
-rw-r--r--src/amun/cpu/dl4mt/decoder.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/amun/cpu/dl4mt/decoder.h b/src/amun/cpu/dl4mt/decoder.h
index 607d41d8..b1c10e97 100644
--- a/src/amun/cpu/dl4mt/decoder.h
+++ b/src/amun/cpu/dl4mt/decoder.h
@@ -182,14 +182,13 @@ class Decoder {
auto t = blaze::forEach(T1_ + T2_ + T3_, Tanh());
if(!filtered_) {
- Probs_ = t * w_.W4_;
- AddBiasVector<byRow>(Probs_, w_.B4_);
+ Probs = t * w_.W4_;
+ AddBiasVector<byRow>(Probs, w_.B4_);
} else {
- Probs_ = t * FilteredW4_;
- AddBiasVector<byRow>(Probs_, FilteredB4_);
+ Probs = t * FilteredW4_;
+ AddBiasVector<byRow>(Probs, FilteredB4_);
}
- mblas::Softmax(Probs_);
- Probs = blaze::forEach(Probs_, Log());
+ LogSoftmax(Probs);
}
void Filter(const std::vector<size_t>& ids) {
@@ -209,7 +208,6 @@ class Decoder {
mblas::Matrix T1_;
mblas::Matrix T2_;
mblas::Matrix T3_;
- mblas::Matrix Probs_;
};
public: