27 #ifndef LBANN_LAYERS_IMAGE_CUTOUT_HPP_INCLUDED 28 #define LBANN_LAYERS_IMAGE_CUTOUT_HPP_INCLUDED 39 template <
typename TensorDataType, data_layout Layout, El::Device Device>
43 "cutout_layer only supports DATA_PARALLEL");
44 static_assert(
Device == El::Device::CPU,
"cutou_layer only supports CPU");
66 template <
typename ArchiveT>
71 std::string
get_type()
const override {
return "cutout"; }
88 #ifndef LBANN_CUTOUT_LAYER_INSTANTIATE 90 extern template class cutout_layer<T, \ 91 data_layout::DATA_PARALLEL, \ 96 #endif // LBANN_CUTOUT_LAYER_INSTANTIATE 100 #endif // LBANN_LAYERS_IMAGE_CUTOUT_HPP_INCLUDED 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...
El::AbstractDistMatrix< TensorDataType > AbsDistMatrixType
The tensor type expected in this object.
void serialize(ArchiveT &ar)
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.
Cutout a square from an image.
constexpr El::Device Device
cutout_layer(lbann_comm *comm)
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.
int get_backprop_requirements() const override
Returns the necessary tensors for computing backpropagation.
void write_specific_proto(lbann_data::Layer &proto) const final
Add layer specific data to prototext.
data_layout
Data layout that is optimized for different modes of parallelism.
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.
int m_expected_num_parent_layers
cutout_layer * copy() const override
Copy function. This function dynamically allocates memory for a layer instance and instantiates a cop...
friend class cereal::access