27 #ifndef LBANN_LAYER_REGULARIZER_SELU_DROPOUT_HPP_INCLUDED 28 #define LBANN_LAYER_REGULARIZER_SELU_DROPOUT_HPP_INCLUDED 43 template <
typename TensorDataType, data_layout T_layout, El::Device Dev>
60 selu_dropout(TensorDataType keep_prob = El::To<TensorDataType>(0.95),
61 TensorDataType alpha =
62 El::To<TensorDataType>(1.6732632423543772848170429916717),
63 TensorDataType scale =
64 El::To<TensorDataType>(1.0507009873554804934193349852946));
86 void setup_data(
size_t max_mini_batch_size)
final;
91 template <
typename ArchiveT>
122 #ifndef LBANN_SELU_DROPOUT_LAYER_INSTANTIATE 123 #define PROTO_DEVICE(T, Device) \ 124 extern template class selu_dropout<T, data_layout::DATA_PARALLEL, Device>; \ 125 extern template class selu_dropout<T, data_layout::MODEL_PARALLEL, Device> 129 #endif // LBANN_SELU_DROPOUT_LAYER_INSTANTIATE 133 #endif // LBANN_LAYER_REGULARIZER_SELU_DROPOUT_HPP_INCLUDED bool can_run_inplace() const override
If True, the computation can run in-place (feeding each input activations tensor as the corresponding...
Scaled dropout for use with SELU activations.
void setup_data(size_t max_mini_batch_size) final
Setup layer data. Called by the 'setup' function. Memory is allocated for distributed matrices...
data_layout get_data_layout() const final
Get data layout of the data tensors. We assume that the data layouts of the previous activations...
constexpr El::Device Device
void serialize(ArchiveT &ar)
TensorDataType m_alpha_prime
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.
selu_dropout(TensorDataType keep_prob=El::To< TensorDataType >(0.95), TensorDataType alpha=El::To< TensorDataType >(1.6732632423543772848170429916717), TensorDataType scale=El::To< TensorDataType >(1.0507009873554804934193349852946))
El::Matrix< TensorDataType, El::Device::CPU > CPUMatrixType
The tensor type expected in this object.
selu_dropout & operator=(const selu_dropout &other)
AbsDistMatrixType * m_mask
TensorDataType m_keep_prob
selu_dropout * copy() const final
Copy function. This function dynamically allocates memory for a layer instance and instantiates a cop...
data_layout
Data layout that is optimized for different modes of parallelism.
void write_specific_proto(lbann_data::Layer &proto) const final
El::AbstractDistMatrix< TensorDataType > AbsDistMatrixType
The tensor type expected in this object.
int get_backprop_requirements() const override
Returns the necessary tensors for computing backpropagation.
El::Device get_device_allocation() const final
Get the device allocation for the data tensors. We assume that the decice allocation of the previous ...
LBANN_DEFINE_LAYER_BUILDER(elu)
std::string get_type() const final
Get the layer type's name.