[mlpack-git] [mlpack/mlpack] fixes: convolve with correct weight slice, pad input in forward pass (#737)
Marcus Edel
notifications at github.com
Mon Aug 8 18:50:23 EDT 2016
> + arma::vec a = arma::linspace<arma::vec>(1, 25, 25);
> + arma::cube input(5, 5, 4);
> + for (size_t i = 0; i < input.n_slices; ++i)
> + {
> + int vec_idx = 0, row_idx = 0;
> + for (size_t j = 0; j < input.n_rows; ++j)
> + {
> + input.slice(i).row(j) = a.subvec(vec_idx, vec_idx + 4).t();
> + vec_idx += 5;
> + }
> + }
> + ConvLayer<> conv3(4, 1, 3, 3, 1, 1, 1, 1);
> + arma::mat id3 = arma::zeros<arma::mat>(3, 3);
> + id3(1, 1) = 1;
> + arma::cube conv3_w(3, 3, 4 * 1);
> + for (size_t i = 0; i < conv3_w.n_slices; ++i)
I think, we should use a nonzero kernel for the test.
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/737/files/e8ef7f47ff7d398bd8a7a6982860294a5a468f68#r73970608
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160808/a35ec77b/attachment.html>
More information about the mlpack-git
mailing list