27 #ifndef LBANN_LAYER_IDENTITY_ZERO_HPP_INCLUDED 28 #define LBANN_LAYER_IDENTITY_ZERO_HPP_INCLUDED 35 template <
typename TensorDataType,
54 template <
typename ArchiveT>
59 std::string
get_type()
const override {
return "identity_zero"; }
78 #ifndef LBANN_IDENTITY_ZERO_LAYER_INSTANTIATE 79 #define PROTO_DEVICE(T, Device) \ 80 extern template class identity_zero_layer<T, \ 81 data_layout::DATA_PARALLEL, \ 83 extern template class identity_zero_layer<T, \ 84 data_layout::MODEL_PARALLEL, \ 89 #endif // LBANN_IDENTITY_ZERO_LAYER_INSTANTIATE 93 #endif // LBANN_LAYER_IDENTITY_ZERO_HPP_INCLUDED int get_backprop_requirements() const override
Returns the necessary tensors for computing backpropagation.
void bp_compute() override
Compute objective funciton gradients. Called by the 'back_prop' function. Given the input...
El::Device get_device_allocation() const override
Get the device allocation for the data tensors. We assume that the decice allocation of the previous ...
std::string get_type() const override
Get the layer type's name.
constexpr El::Device Device
identity_zero_layer(lbann_comm *comm)
Output tensor filled with a single value.
void setup_dims() override
Setup tensor dimensions Called by the 'setup' function. If there are any input tensors, the base method sets all uninitialized output tensor dimensions equal to the first input tensor dimensions.
void fp_compute() override
Apply layer operation. Called by the 'forward_prop' function. Given the input tensors, the output tensors are populated with computed values.
bool can_run_inplace() const override
If True, the computation can run in-place (feeding each input activations tensor as the corresponding...
data_layout
Data layout that is optimized for different modes of parallelism.
void serialize(ArchiveT &ar)
data_layout get_data_layout() const override
Get data layout of the data tensors. We assume that the data layouts of the previous activations...
void write_specific_proto(lbann_data::Layer &proto) const final
Add layer specific data to prototext.
friend class cereal::access
identity_zero_layer * copy() const override
Copy function. This function dynamically allocates memory for a layer instance and instantiates a cop...
int m_expected_num_parent_layers