Change the layout of the data by shrinking one dimension (or set of dimensions) and growing another dimension (or set of dimensions), while keeping the total number of data elements constant, and maintaining the current data ordering. Currently, the only supported operation is depth into space by a power of 2. E.g. (y, x, z) -> (y*2, x*2, z/4) Note that Reshape may not be a no-op, depending on t
| 2212 | // x0 x0 x1 x1 x0 x0 x1 x1 x0 x0 x1 x1 x0 x0 x1 x1 |
| 2213 | // z0 z1 z0 z1 z0 z1 z0 z1 z0 z1 z0 z1 z0 z1 z0 z1 |
| 2214 | virtual bool DoReshape(Stream* stream, |
| 2215 | const dnn::BatchDescriptor& input_dimensions, |
| 2216 | const DeviceMemory<float>& input_data, |
| 2217 | const dnn::BatchDescriptor& output_dimensions, |
| 2218 | DeviceMemory<float>* output_data) { |
| 2219 | return false; |
| 2220 | } |
| 2221 | |
| 2222 | // Depth to space takes an X by Y image with depth D*M² and changes it to an |
| 2223 | // MX x MY image with depth D. Each input location (x,y) with depth D*M² in |