27 #ifndef LBANN_LAYERS_IMAGE_ROTATION_HPP_INCLUDED 28 #define LBANN_LAYERS_IMAGE_ROTATION_HPP_INCLUDED 39 template <
typename TensorDataType, data_layout Layout, El::Device Device>
43 "rotation_layer only supports DATA_PARALLEL");
44 static_assert(
Device == El::Device::CPU,
"rotation_layer only supports CPU");
66 template <
typename ArchiveT>
71 std::string
get_type()
const override {
return "rotation"; }
89 #ifndef LBANN_ROTATION_LAYER_INSTANTIATE 91 extern template class rotation_layer<T, \ 92 data_layout::DATA_PARALLEL, \ 97 #endif // LBANN_ROTATION_LAYER_INSTANTIATE 101 #endif // LBANN_LAYERS_IMAGE_ROTATION_HPP_INCLUDED void serialize(ArchiveT &ar)
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.
std::string get_type() const override
Get the layer type's name.
El::AbstractDistMatrix< TensorDataType > AbsDistMatrixType
The tensor type expected in this object.
void write_specific_proto(lbann_data::Layer &proto) const final
El::Device get_device_allocation() const override
Get the device allocation for the data tensors. We assume that the decice allocation of the previous ...
constexpr El::Device Device
friend class cereal::access
rotation_layer(lbann_comm *comm)
int get_backprop_requirements() const override
Returns the necessary tensors for computing backpropagation.
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.
data_layout get_data_layout() const override
Get data layout of the data tensors. We assume that the data layouts of the previous activations...
data_layout
Data layout that is optimized for different modes of parallelism.
Rotate a image clockwise around its center.
rotation_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
bool can_run_inplace() const override
If True, the computation can run in-place (feeding each input activations tensor as the corresponding...