27 #ifndef LBANN_LAYERS_TRANSFORM_PERMUTE_HPP_INCLUDED 28 #define LBANN_LAYERS_TRANSFORM_PERMUTE_HPP_INCLUDED 69 template <
typename ArchiveT>
93 std::unique_ptr<PermuteImpl>
m_impl;
96 #if defined(LBANN_HAS_TENSOR_PERMUTE) 100 #ifndef LBANN_PERMUTE_LAYER_INSTANTIATE 101 #define PROTO(T) extern template class PermuteLayer<T> 102 #define LBANN_INSTANTIATE_GPU_HALF 105 #endif // LBANN_PERMUTE_LAYER_INSTANTIATE 107 #endif // LBANN_HAS_TENSOR_PERMUTE 110 #endif // LBANN_LAYERS_TRANSFORM_PERMUTE_HPP_INCLUDED friend class cereal::access
void swap(PermuteLayer &other)
void bp_compute() final
Compute objective funciton gradients. Called by the 'back_prop' function. Given the input...
El::Device get_device_allocation() const final
Get the device allocation for the data tensors. We assume that the decice allocation of the previous ...
void setup_dims() final
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 write_specific_proto(lbann_data::Layer &proto) const final
Add layer specific data to prototext.
description get_description() const final
Human-readable description.
std::unique_ptr< PermuteImpl > m_impl
Neural network tensor operation.
Generates nicely formatted description messages.
data_layout get_data_layout() const final
Get data layout of the data tensors. We assume that the data layouts of the previous activations...
int get_backprop_requirements() const override
Returns the necessary tensors for computing backpropagation.
constexpr El::Device Device
void fp_compute() final
Apply layer operation. Called by the 'forward_prop' function. Given the input tensors, the output tensors are populated with computed values.
void serialize(ArchiveT &ar)
data_layout
Data layout that is optimized for different modes of parallelism.
PermuteLayer * copy() const final
Copy function. This function dynamically allocates memory for a layer instance and instantiates a cop...
PermuteLayer & operator=(PermuteLayer const &other)
bool can_run_inplace() const override
If True, the computation can run in-place (feeding each input activations tensor as the corresponding...
Permute the indices of a tensor.
std::string get_type() const final
Get the layer type's name.