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:
authorHieu Hoang <hieuhoang@gmail.com>2017-12-01 23:00:34 +0300
committerHieu Hoang <hieuhoang@gmail.com>2017-12-01 23:00:34 +0300
commitbf60308a9273ba8cd7ee57503ff2cfb7fba65aba (patch)
tree09e9ee0a17a2bd9d49ae5c1ecfd00859fc0ba9a7
parent42812dd674aba04f0cb3e5e59fed930e6568a2ab (diff)
debug
-rw-r--r--src/amun/half/dl4mt/decoder.h5
-rw-r--r--src/amun/half/mblas/vector.h9
2 files changed, 13 insertions, 1 deletions
diff --git a/src/amun/half/dl4mt/decoder.h b/src/amun/half/dl4mt/decoder.h
index 91d6a038..63ed31a3 100644
--- a/src/amun/half/dl4mt/decoder.h
+++ b/src/amun/half/dl4mt/decoder.h
@@ -200,7 +200,10 @@ class Decoder {
} else {
BroadcastVec(_1 + _2, Temp2_, *w_.B_/*, s_[1]*/);
}
- //std::cerr << "2Temp2_=" << Temp2_.Debug() << std::endl;
+ std::cerr << "Temp1_=" << Temp1_.Debug(0) << std::endl;
+ std::cerr << "SCU_=" << SCU_.Debug(0) << std::endl;
+ std::cerr << "Temp2_=" << Temp2_.Debug(0) << std::endl;
+ std::cerr << "dBatchMapping_=" << dBatchMapping_.Debug(0) << std::endl;
Broadcast(Tanh(_1 + _2), Temp1_, SCU_, Temp2_, dBatchMapping_, maxLength);
diff --git a/src/amun/half/mblas/vector.h b/src/amun/half/mblas/vector.h
index 94408200..7c310b06 100644
--- a/src/amun/half/mblas/vector.h
+++ b/src/amun/half/mblas/vector.h
@@ -7,6 +7,7 @@
*/
#include "../types-gpu.h"
+#include <sstream>
namespace amunmt {
namespace GPUHalf {
@@ -145,6 +146,14 @@ public:
std::swap(data_, other.data_);
}
+ virtual std::string Debug(size_t verbosity = 1) const
+ {
+ std::stringstream strm;
+ strm << maxSize_ << " " << size_;
+
+ return strm.str();
+ }
+
protected:
size_t size_, maxSize_;
T *data_;