Conversation
Updated Cereal_nvp
Added pixel shuffle to more_types
|
@zoq @kartikdutt18 Are there any more changes required in this pr. |
kartikdutt18
left a comment
There was a problem hiding this comment.
Hey @abh2k, These are minor changes and a point to discuss on. Thanks for taking the time to create the PR.
Regards.
| arma::mat inputImage = input.col(n); | ||
| arma::mat outputImage = output.col(n); | ||
| arma::cube inputTemp(const_cast<arma::mat&>(inputImage).memptr(), height, | ||
| width, size, false, false); | ||
| arma::cube outputTemp(const_cast<arma::mat&>(outputImage).memptr(), | ||
| outputHeight, outputWidth, sizeOut, false, false); |
There was a problem hiding this comment.
I'm not sure about this but maybe we can do this without the creating copies (which add to latency / space utilization). If
arma::cube inputTemp(const_cast<arma::mat&>(input.col(n)).memptr(), height,
width, size, false, false);
doesn't work, we can
arma::cube inputTemp(const_cast<arma::mat&>(input).memptr(), height,
width, size * batchSize, false, false);
and then use span. That way we don't create copies.
Also save time on copying back (maybe). Let me know incase I missed something.
There was a problem hiding this comment.
@kartikdutt18 @zoq I made the required changes. Now the copying step has been removed. Please review.
Co-authored-by: kartikdutt18 <39593019+kartikdutt18@users.noreply.github.com>
075881a to
7b70a82
Compare
kartikdutt18
left a comment
There was a problem hiding this comment.
Looks good to me!
Thanks a lot for the contribution.
Regards.
| @@ -0,0 +1,180 @@ | |||
| /** | |||
| * @file methods/ann/layer/pixel_shuffle.hpp | |||
| * @author Anjishnu Mukherjee | |||
There was a problem hiding this comment.
Feel free to add yourself as co-author.
Added pixel shuffle layer