mirror of
https://github.com/marian-nmt/marian.git
synced 2024-09-11 06:15:56 +03:00
debug
This commit is contained in:
parent
93eb3ca7ab
commit
5c7c044dd9
@ -155,7 +155,7 @@ class TensorImpl {
|
||||
void set(const std::vector<Float> &values) {
|
||||
size_t totSize = std::accumulate(shape().begin(), shape().end(),
|
||||
1, std::multiplies<int>());
|
||||
std::cerr << "totSize=" << totSize << " " << values.size() << std::endl;
|
||||
std::cerr << "tensor size=" << totSize << " vector size=" << values.size() << std::endl;
|
||||
assert(totSize == values.size());
|
||||
thrust::copy(values.begin(), values.end(), data_.begin());
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ int main(int argc, char** argv) {
|
||||
int numImg, imgSize;
|
||||
vector<float> images = datasets::mnist::ReadImages("../examples/mnist/t10k-images-idx3-ubyte", numImg, imgSize);
|
||||
vector<int> labels = datasets::mnist::ReadLabels("../examples/mnist/t10k-labels-idx1-ubyte");
|
||||
cerr << "images=" << images.size() << " labels=" << labels.size() << endl;
|
||||
tx.Load(images);
|
||||
//ty.Load(labels);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user