Depth to space takes an X by Y image with depth D*M² and changes it to an MX x MY image with depth D. Each input location (x,y) with depth D*M² in the input image is changed to an MxM contiguous area in the output image, with the values being laid out in the raster order by DepthToSpaceLayout, and will have a new depth of D. Example. M=2, Din =8, Xin=2, Yin=2. Xout=4, Yout=4, Dout=2 DepthHeightW
| 2240 | // |
| 2241 | // sqrt_depth_reduction: 'M' in the comment above |
| 2242 | virtual bool DoDepthToSpace(Stream* stream, |
| 2243 | const dnn::BatchDescriptor& input_dimensions, |
| 2244 | const DeviceMemory<float>& input_data, |
| 2245 | const DepthToSpaceLayout& depth_to_space_layout, |
| 2246 | const int& sqrt_depth_reduction, |
| 2247 | DeviceMemory<float>* output_data) { |
| 2248 | return false; |
| 2249 | } |
| 2250 | |
| 2251 | // Space to depth is the inverse of depth to space. Space to depth takes each |
| 2252 | // non-overlapping M by M patch (in the X and Y dimensions) with depth D of |