31 const T *input_data,
const Shape &unextended_output_shape, T *output_data)
35 const Shape input_shape = Shape::ExtendedShape(4, unextended_input_shape);
42 const int input_depth = input_shape.
Dims(3);
43 const int batch_size = input_shape.
Dims(0);
46 const int stride = params.
block_size * input_depth;
48 for (
int batch = 0; batch < batch_size; ++batch)
50 for (
int out_h = 0; out_h < output_height; ++out_h)
53 for (
int offset_h = 0; offset_h < params.
block_size; ++offset_h)
56 for (
int out_w = 0; out_w < output_width; ++out_w)
58 memcpy(dst, input_data, stride *
sizeof(T));
void SpaceToDepth(const SpaceToDepthParams ¶ms, const Shape &unextended_input_shape, const T *input_data, const Shape &unextended_output_shape, T *output_data)