| 335 | |
| 336 | template <typename TensorDataType, data_layout Layout, El::Device Device> |
| 337 | dc::Shape convolution_distconv_adapter<TensorDataType, Layout, Device>:: |
| 338 | get_activations_local_shape(int index) const |
| 339 | { |
| 340 | assert_eq(index, 0); |
| 341 | const auto& layer = |
| 342 | dynamic_cast<const convolution_layer<TensorDataType, Layout, Device>&>( |
| 343 | this->layer()); |
| 344 | auto filter_dims = layer.get_kernel_dims(); |
| 345 | std::reverse(std::begin(filter_dims), std::end(filter_dims)); |
| 346 | auto strides = layer.m_strides; |
| 347 | std::reverse(std::begin(strides), std::end(strides)); |
| 348 | auto dilations = layer.m_dilations; |
| 349 | std::reverse(std::begin(dilations), std::end(dilations)); |
| 350 | const auto output_spatial_local_shape = |
| 351 | ::distconv::get_convolution_output_local_tensor_shape( |
| 352 | this->get_prev_activations(), |
| 353 | filter_dims, |
| 354 | strides, |
| 355 | true, |
| 356 | dilations, |
| 357 | layer.m_groups); |
| 358 | return output_spatial_local_shape; |
| 359 | } |
| 360 | |
| 361 | template <typename TensorDataType, data_layout Layout, El::Device Device> |
| 362 | void convolution_distconv_adapter<TensorDataType, Layout, Device>::setup_layer( |
nothing calls this directly
no test coverage detected