MCPcopy Create free account
hub / github.com/LBANN/lbann / get_activations_local_shape

Method get_activations_local_shape

src/layers/learning/convolution.cpp:337–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335
336template <typename TensorDataType, data_layout Layout, El::Device Device>
337dc::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
361template <typename TensorDataType, data_layout Layout, El::Device Device>
362void convolution_distconv_adapter<TensorDataType, Layout, Device>::setup_layer(

Callers

nothing calls this directly

Calls 2

assert_eqFunction · 0.85
get_kernel_dimsMethod · 0.45

Tested by

no test coverage detected