Expression Templates Library (ETL)
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
etl::inverted_dropout_mask_generator_op< T > Struct Template Reference

Generator from an uniform distribution. More...

#include <inverted_dropout_mask.hpp>

Public Types

using value_type = T
 The value type.
 

Public Member Functions

 inverted_dropout_mask_generator_op (T probability)
 Construct a new generator with the given start and end of the range.
 
value_type operator() ()
 Generate a new value. More...
 
template<typename Y >
auto gpu_compute_hint (Y &y) noexcept
 Compute the result of the operation using the GPU. More...
 
template<typename Y >
Y & gpu_compute (Y &y) noexcept
 Compute the result of the operation using the GPU. More...
 

Public Attributes

const T probability
 The dropout probability.
 
random_engine rand_engine
 The random engine.
 
dropout_distribution< value_typedistribution
 The used distribution.
 

Static Public Attributes

static constexpr bool gpu_computable
 Indicates if the operator can be computed on GPU. More...
 

Friends

std::ostream & operator<< (std::ostream &os, const inverted_dropout_mask_generator_op &s)
 Outputs the given generator to the given stream. More...
 

Detailed Description

template<typename T = double>
struct etl::inverted_dropout_mask_generator_op< T >

Generator from an uniform distribution.

Member Function Documentation

◆ gpu_compute()

template<typename T = double>
template<typename Y >
Y& etl::inverted_dropout_mask_generator_op< T >::gpu_compute ( Y &  y)
inlinenoexcept

Compute the result of the operation using the GPU.

Parameters
xThe expression of the unary operation
yThe expression into which to store the reuslt

◆ gpu_compute_hint()

template<typename T = double>
template<typename Y >
auto etl::inverted_dropout_mask_generator_op< T >::gpu_compute_hint ( Y &  y)
inlinenoexcept

Compute the result of the operation using the GPU.

Parameters
xThe expression of the unary operation
Returns
The result of applying the unary operator on x. The result must be a GPU computed expression.

◆ operator()()

template<typename T = double>
value_type etl::inverted_dropout_mask_generator_op< T >::operator() ( )
inline

Generate a new value.

Returns
the newly generated value

Friends And Related Function Documentation

◆ operator<<

template<typename T = double>
std::ostream& operator<< ( std::ostream &  os,
const inverted_dropout_mask_generator_op< T > &  s 
)
friend

Outputs the given generator to the given stream.

Parameters
osThe output stream
sThe generator
Returns
the output stream

Member Data Documentation

◆ gpu_computable

template<typename T = double>
constexpr bool etl::inverted_dropout_mask_generator_op< T >::gpu_computable
static
Initial value:
=
(is_single_precision_t<T> && impl::egblas::has_sinv_dropout_seed) || (is_double_precision_t<T> && impl::egblas::has_dinv_dropout_seed)

Indicates if the operator can be computed on GPU.


The documentation for this struct was generated from the following file: