[mlpack-git] [mlpack/mlpack] fixes: convolve with correct weight slice, pad input in forward pass (#737)
Nilay Jain
notifications at github.com
Sun Aug 14 07:11:47 EDT 2016
> + 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)
> + conv3_w.slice(i) = id3;
> + conv3.Weights() = conv3_w;
> +
> + arma::cube output(5, 5, 1);
> + output.slice(0) = input.slice(0) * 4;
in the next line(51) we are initializing output.slice(0) to input.slice(0) * 4, and then testing whether we get this output.
--
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#r74700008
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160814/c5bb1db3/attachment.html>
More information about the mlpack-git
mailing list