Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Add version of readPngImage... that writes into an existing Tensor #2358
The Image reading functions (lib/Base/Image.h) either take a Tensor* and reset it to the dimensions of the image, or in the case of readPngImageAndPreprocess create a new Tensor. This means that when loading a batch of images that should go into the same Tensor we do unnecessary copies.
Write a version of readImage (andPreprocess?) which takes a four dimensional tensor (w/ an index) and writes into it. The input tensor must have the same dimensions as the image.