| 28 | |
| 29 | template <typename Device, typename T> |
| 30 | struct SpatialMaxPooling { |
| 31 | void operator()(const Device& d, typename TTypes<T, 4>::Tensor output, |
| 32 | typename TTypes<T, 4>::ConstTensor input, int window_rows, |
| 33 | int window_cols, int row_stride, int col_stride, |
| 34 | const Eigen::PaddingType& padding) { |
| 35 | // Because we swap the layout, we swap the row/cols as well |
| 36 | output.swap_layout().device(d) = |
| 37 | Eigen::SpatialMaxPooling(input.swap_layout(), window_cols, window_rows, |
| 38 | col_stride, row_stride, padding); |
| 39 | } |
| 40 | }; |
| 41 | |
| 42 | template <typename Device> |
| 43 | struct SpatialMaxPooling<Device, qint8> { |
no outgoing calls