23 template<
typename AFloat>
25 AFloat dropoutProbability)
29 auto f = [&
data, dropoutProbability](
UInt_t workerID)
31 TRandom rand(time(
nullptr) + workerID);
33 data[workerID] = (r > dropoutProbability) ? 0.0 : data[workerID] / dropoutProbability;
size_t GetNElements() const
This is the base class for the ROOT Random number generators.
static void Dropout(TCpuMatrix< Scalar_t > &A, Scalar_t p)
Apply dropout with activation probability p to the given matrix A and scale the result by reciprocal ...
static ROOT::TThreadExecutor & GetThreadExecutor()
AFloat * GetRawDataPointer()
Return raw pointer to the elements stored contiguously in column-major order.
A pseudo container class which is a generator of indices.
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
Abstract ClassifierFactory template that handles arbitrary types.
auto Map(F func, unsigned nTimes) -> std::vector< typename std::result_of< F()>::type >
Execute func (with no arguments) nTimes in parallel.