27 #ifndef LBANN_LAYER_DUMMY_HPP_INCLUDED 28 #define LBANN_LAYER_DUMMY_HPP_INCLUDED 39 template <
typename TensorDataType,
68 template <
typename ArchiveT>
73 std::string
get_type()
const override {
return "dummy"; }
80 void fill_onnx_node(onnx::GraphProto& graph)
const override {}
81 #endif // LBANN_HAS_ONNX 97 #ifndef LBANN_DUMMY_LAYER_INSTANTIATE 98 #define PROTO_DEVICE(T, Device) \ 99 extern template class dummy_layer<T, data_layout::DATA_PARALLEL, Device>; \ 100 extern template class dummy_layer<T, data_layout::MODEL_PARALLEL, Device> 104 #endif // LBANN_DUMMY_LAYER_INSTANTIATE 108 #endif // LBANN_LAYER_DUMMY_HPP_INCLUDED
El::Device get_device_allocation() const override
Get the device allocation for the data tensors. We assume that the decice allocation of the previous ...
friend class cereal::access
std::unique_ptr< AbsDistMatrixType > m_error_signal
Placeholder layer with no child layers.
dummy_layer(lbann_comm *comm)
constexpr El::Device Device
int m_expected_num_child_layers
Expected number of child layers. A negative value indicates no limit.
dummy_layer * copy() const override
Copy function. This function dynamically allocates memory for a layer instance and instantiates a cop...
void serialize(ArchiveT &ar)
dummy_layer(const dummy_layer &other)
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.
int get_backprop_requirements() const override
Returns the necessary tensors for computing backpropagation.
El::AbstractDistMatrix< TensorDataType > AbsDistMatrixType
The tensor type expected in this object.
data_layout
Data layout that is optimized for different modes of parallelism.
void set_error_signal(std::unique_ptr< AbsDistMatrixType > signal)
Set the error signal of this layer. Used for backpropagation testing purposes.
void write_specific_proto(lbann_data::Layer &proto) const final
data_layout get_data_layout() const override
Get data layout of the data tensors. We assume that the data layouts of the previous activations...
bool can_run_inplace() const override
If True, the computation can run in-place (feeding each input activations tensor as the corresponding...
void bp_compute() override
Compute objective funciton gradients. Called by the 'back_prop' function. Given the input...
std::string get_type() const override
Get the layer type's name.