| 230 | |
| 231 | template <typename T, data_layout L, El::Device D> |
| 232 | void convolution_layer<T, L, D>::write_specific_proto( |
| 233 | lbann_data::Layer& proto) const |
| 234 | { |
| 235 | proto.set_datatype(proto::ProtoDataType<T>); |
| 236 | auto* msg = proto.mutable_convolution(); |
| 237 | msg->set_num_dims(this->get_conv_dims().size()); |
| 238 | msg->set_out_channels(this->m_output_channels); |
| 239 | protobuf::assign_to_repeated(*msg->mutable_kernel_size(), |
| 240 | this->get_kernel_dims()); |
| 241 | protobuf::assign_to_repeated(*msg->mutable_stride(), this->get_strides()); |
| 242 | protobuf::assign_to_repeated(*msg->mutable_padding(), this->get_pads()); |
| 243 | msg->mutable_groups()->set_value(this->m_groups); |
| 244 | auto const has_bias = (this->num_weights() > 1UL); |
| 245 | msg->mutable_has_bias()->set_value(has_bias); |
| 246 | protobuf::assign_to_repeated(*msg->mutable_dilation(), this->get_dilations()); |
| 247 | #ifdef LBANN_HAS_DNN_LIB |
| 248 | msg->set_conv_tensor_op_mode( |
| 249 | dnn_lib::convert_to_proto_math_type(this->m_convolution_math_type)); |
| 250 | #endif // LBANN_HAS_DNN_LIB |
| 251 | } |
| 252 | |
| 253 | #if defined LBANN_HAS_DISTCONV |
| 254 | template <typename TensorDataType, data_layout Layout, El::Device Device> |
nothing calls this directly
no test coverage detected