Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TMVA::Experimental::Internal::RBatchGenerator< Args > Class Template Reference

template<typename... Args>
class TMVA::Experimental::Internal::RBatchGenerator< Args >

Definition at line 46 of file RBatchGenerator.hxx.

Public Member Functions

 RBatchGenerator (ROOT::RDF::RNode &rdf, const std::size_t chunkSize, const std::size_t blockSize, const std::size_t batchSize, const std::vector< std::string > &cols, const std::vector< std::size_t > &vecSizes={}, const float vecPadding=0.0, const float validationSplit=0.0, const std::size_t maxChunks=0, bool shuffle=true, bool dropRemainder=true, const std::size_t setSeed=0)
 
 ~RBatchGenerator ()
 
void Activate ()
 Activate the loading process by starting the batchloader, and spawning the loading thread.
 
void ActivateEpoch ()
 
void ActivateTrainingEpoch ()
 
void ActivateValidationEpoch ()
 
void CreateTrainBatches ()
 Create training batches by first loading a chunk (see RChunkLoader) and split it into batches (see RBatchLoader)
 
void CreateValidationBatches ()
 Creates validation batches by first loading a chunk (see RChunkLoader), and then split it into batches (see RBatchLoader)

 
void DeActivate ()
 
void DeActivateEpoch ()
 
void DeActivateTrainingEpoch ()
 
void DeActivateValidationEpoch ()
 
TMVA::Experimental::RTensor< float > GetTrainBatch ()
 Loads a training batch from the queue.
 
TMVA::Experimental::RTensor< float > GetValidationBatch ()
 Loads a validation batch from the queue

 
bool IsActive ()
 
std::size_t NumberOfTrainingBatches ()
 
std::size_t NumberOfValidationBatches ()
 
bool TrainingIsActive ()
 
std::size_t TrainRemainderRows ()
 
std::size_t ValidationRemainderRows ()
 

Private Attributes

ROOT::RDF::RNodef_rdf
 
std::unique_ptr< RBatchLoaderfBatchLoader
 
std::size_t fBatchSize
 
std::size_t fBlockSize
 
std::unique_ptr< RChunkLoader< Args... > > fChunkLoader
 
std::size_t fChunkSize
 
std::vector< std::string > fCols
 
bool fDropRemainder
 
ROOT::RDF::RResultPtr< std::vector< ULong64_t > > fEntries
 
bool fEpochActive {false}
 
bool fIsActive {false}
 
std::mutex fIsActiveMutex
 
std::size_t fLeftoverTrainingBatchSize
 
std::size_t fLeftoverValidationBatchSize
 
std::unique_ptr< std::thread > fLoadingThread
 
std::size_t fMaxChunks
 
bool fNotFiltered
 
std::size_t fNumChunkCols
 
std::size_t fNumColumns
 
std::size_t fNumEntries
 
std::size_t fNumFullTrainingBatches
 
std::size_t fNumFullValidationBatches
 
std::size_t fNumLeftoverTrainingBatches
 
std::size_t fNumLeftoverValidationBatches
 
std::size_t fNumTrainingBatches
 
std::size_t fNumTrainingChunks
 
std::size_t fNumTrainingEntries
 
std::size_t fNumValidationBatches
 
std::size_t fNumValidationChunks
 
std::size_t fNumValidationEntries
 
std::size_t fSetSeed
 
bool fShuffle
 
std::size_t fSumVecSizes
 
TMVA::Experimental::RTensor< float > fTrainChunkTensor
 
std::size_t fTrainingChunkNum
 
bool fTrainingEpochActive {false}
 
TMVA::Experimental::RTensor< float > fTrainTensor
 
bool fUseWholeFile
 
std::size_t fValidationChunkNum
 
TMVA::Experimental::RTensor< float > fValidationChunkTensor
 
bool fValidationEpochActive {false}
 
float fValidationSplit
 
TMVA::Experimental::RTensor< float > fValidationTensor
 

#include <TMVA/BatchGenerator/RBatchGenerator.hxx>

Constructor & Destructor Documentation

◆ RBatchGenerator()

template<typename... Args>
TMVA::Experimental::Internal::RBatchGenerator< Args >::RBatchGenerator ( ROOT::RDF::RNode & rdf,
const std::size_t chunkSize,
const std::size_t blockSize,
const std::size_t batchSize,
const std::vector< std::string > & cols,
const std::vector< std::size_t > & vecSizes = {},
const float vecPadding = 0.0,
const float validationSplit = 0.0,
const std::size_t maxChunks = 0,
bool shuffle = true,
bool dropRemainder = true,
const std::size_t setSeed = 0 )
inline

Definition at line 110 of file RBatchGenerator.hxx.

◆ ~RBatchGenerator()

template<typename... Args>
TMVA::Experimental::Internal::RBatchGenerator< Args >::~RBatchGenerator ( )
inline

Definition at line 183 of file RBatchGenerator.hxx.

Member Function Documentation

◆ Activate()

template<typename... Args>
void TMVA::Experimental::Internal::RBatchGenerator< Args >::Activate ( )
inline

Activate the loading process by starting the batchloader, and spawning the loading thread.

Definition at line 203 of file RBatchGenerator.hxx.

◆ ActivateEpoch()

template<typename... Args>
void TMVA::Experimental::Internal::RBatchGenerator< Args >::ActivateEpoch ( )
inline

Definition at line 217 of file RBatchGenerator.hxx.

◆ ActivateTrainingEpoch()

template<typename... Args>
void TMVA::Experimental::Internal::RBatchGenerator< Args >::ActivateTrainingEpoch ( )
inline

Definition at line 221 of file RBatchGenerator.hxx.

◆ ActivateValidationEpoch()

template<typename... Args>
void TMVA::Experimental::Internal::RBatchGenerator< Args >::ActivateValidationEpoch ( )
inline

Definition at line 225 of file RBatchGenerator.hxx.

◆ CreateTrainBatches()

template<typename... Args>
void TMVA::Experimental::Internal::RBatchGenerator< Args >::CreateTrainBatches ( )
inline

Create training batches by first loading a chunk (see RChunkLoader) and split it into batches (see RBatchLoader)

Definition at line 230 of file RBatchGenerator.hxx.

◆ CreateValidationBatches()

template<typename... Args>
void TMVA::Experimental::Internal::RBatchGenerator< Args >::CreateValidationBatches ( )
inline

Creates validation batches by first loading a chunk (see RChunkLoader), and then split it into batches (see RBatchLoader)

Definition at line 244 of file RBatchGenerator.hxx.

◆ DeActivate()

template<typename... Args>
void TMVA::Experimental::Internal::RBatchGenerator< Args >::DeActivate ( )
inline

Definition at line 185 of file RBatchGenerator.hxx.

◆ DeActivateEpoch()

template<typename... Args>
void TMVA::Experimental::Internal::RBatchGenerator< Args >::DeActivateEpoch ( )
inline

Definition at line 219 of file RBatchGenerator.hxx.

◆ DeActivateTrainingEpoch()

template<typename... Args>
void TMVA::Experimental::Internal::RBatchGenerator< Args >::DeActivateTrainingEpoch ( )
inline

Definition at line 223 of file RBatchGenerator.hxx.

◆ DeActivateValidationEpoch()

template<typename... Args>
void TMVA::Experimental::Internal::RBatchGenerator< Args >::DeActivateValidationEpoch ( )
inline

Definition at line 227 of file RBatchGenerator.hxx.

◆ GetTrainBatch()

template<typename... Args>
TMVA::Experimental::RTensor< float > TMVA::Experimental::Internal::RBatchGenerator< Args >::GetTrainBatch ( )
inline

Loads a training batch from the queue.

Definition at line 258 of file RBatchGenerator.hxx.

◆ GetValidationBatch()

template<typename... Args>
TMVA::Experimental::RTensor< float > TMVA::Experimental::Internal::RBatchGenerator< Args >::GetValidationBatch ( )
inline

Loads a validation batch from the queue

Definition at line 280 of file RBatchGenerator.hxx.

◆ IsActive()

template<typename... Args>
bool TMVA::Experimental::Internal::RBatchGenerator< Args >::IsActive ( )
inline

Definition at line 307 of file RBatchGenerator.hxx.

◆ NumberOfTrainingBatches()

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::NumberOfTrainingBatches ( )
inline

Definition at line 301 of file RBatchGenerator.hxx.

◆ NumberOfValidationBatches()

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::NumberOfValidationBatches ( )
inline

Definition at line 302 of file RBatchGenerator.hxx.

◆ TrainingIsActive()

template<typename... Args>
bool TMVA::Experimental::Internal::RBatchGenerator< Args >::TrainingIsActive ( )
inline

Definition at line 308 of file RBatchGenerator.hxx.

◆ TrainRemainderRows()

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::TrainRemainderRows ( )
inline

Definition at line 304 of file RBatchGenerator.hxx.

◆ ValidationRemainderRows()

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::ValidationRemainderRows ( )
inline

Definition at line 305 of file RBatchGenerator.hxx.

Member Data Documentation

◆ f_rdf

template<typename... Args>
ROOT::RDF::RNode& TMVA::Experimental::Internal::RBatchGenerator< Args >::f_rdf
private

Definition at line 71 of file RBatchGenerator.hxx.

◆ fBatchLoader

template<typename... Args>
std::unique_ptr<RBatchLoader> TMVA::Experimental::Internal::RBatchGenerator< Args >::fBatchLoader
private

Definition at line 64 of file RBatchGenerator.hxx.

◆ fBatchSize

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::fBatchSize
private

Definition at line 52 of file RBatchGenerator.hxx.

◆ fBlockSize

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::fBlockSize
private

Definition at line 53 of file RBatchGenerator.hxx.

◆ fChunkLoader

template<typename... Args>
std::unique_ptr<RChunkLoader<Args...> > TMVA::Experimental::Internal::RBatchGenerator< Args >::fChunkLoader
private

Definition at line 63 of file RBatchGenerator.hxx.

◆ fChunkSize

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::fChunkSize
private

Definition at line 50 of file RBatchGenerator.hxx.

◆ fCols

template<typename... Args>
std::vector<std::string> TMVA::Experimental::Internal::RBatchGenerator< Args >::fCols
private

Definition at line 48 of file RBatchGenerator.hxx.

◆ fDropRemainder

template<typename... Args>
bool TMVA::Experimental::Internal::RBatchGenerator< Args >::fDropRemainder
private

Definition at line 75 of file RBatchGenerator.hxx.

◆ fEntries

template<typename... Args>
ROOT::RDF::RResultPtr<std::vector<ULong64_t> > TMVA::Experimental::Internal::RBatchGenerator< Args >::fEntries
private

Definition at line 60 of file RBatchGenerator.hxx.

◆ fEpochActive

template<typename... Args>
bool TMVA::Experimental::Internal::RBatchGenerator< Args >::fEpochActive {false}
private

Definition at line 81 of file RBatchGenerator.hxx.

◆ fIsActive

template<typename... Args>
bool TMVA::Experimental::Internal::RBatchGenerator< Args >::fIsActive {false}
private

Definition at line 77 of file RBatchGenerator.hxx.

◆ fIsActiveMutex

template<typename... Args>
std::mutex TMVA::Experimental::Internal::RBatchGenerator< Args >::fIsActiveMutex
private

Definition at line 73 of file RBatchGenerator.hxx.

◆ fLeftoverTrainingBatchSize

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::fLeftoverTrainingBatchSize
private

Definition at line 91 of file RBatchGenerator.hxx.

◆ fLeftoverValidationBatchSize

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::fLeftoverValidationBatchSize
private

Definition at line 92 of file RBatchGenerator.hxx.

◆ fLoadingThread

template<typename... Args>
std::unique_ptr<std::thread> TMVA::Experimental::Internal::RBatchGenerator< Args >::fLoadingThread
private

Definition at line 66 of file RBatchGenerator.hxx.

◆ fMaxChunks

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::fMaxChunks
private

Definition at line 51 of file RBatchGenerator.hxx.

◆ fNotFiltered

template<typename... Args>
bool TMVA::Experimental::Internal::RBatchGenerator< Args >::fNotFiltered
private

Definition at line 78 of file RBatchGenerator.hxx.

◆ fNumChunkCols

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::fNumChunkCols
private

Definition at line 55 of file RBatchGenerator.hxx.

◆ fNumColumns

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::fNumColumns
private

Definition at line 54 of file RBatchGenerator.hxx.

◆ fNumEntries

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::fNumEntries
private

Definition at line 56 of file RBatchGenerator.hxx.

◆ fNumFullTrainingBatches

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::fNumFullTrainingBatches
private

Definition at line 94 of file RBatchGenerator.hxx.

◆ fNumFullValidationBatches

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::fNumFullValidationBatches
private

Definition at line 95 of file RBatchGenerator.hxx.

◆ fNumLeftoverTrainingBatches

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::fNumLeftoverTrainingBatches
private

Definition at line 97 of file RBatchGenerator.hxx.

◆ fNumLeftoverValidationBatches

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::fNumLeftoverValidationBatches
private

Definition at line 98 of file RBatchGenerator.hxx.

◆ fNumTrainingBatches

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::fNumTrainingBatches
private

Definition at line 100 of file RBatchGenerator.hxx.

◆ fNumTrainingChunks

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::fNumTrainingChunks
private

Definition at line 88 of file RBatchGenerator.hxx.

◆ fNumTrainingEntries

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::fNumTrainingEntries
private

Definition at line 85 of file RBatchGenerator.hxx.

◆ fNumValidationBatches

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::fNumValidationBatches
private

Definition at line 101 of file RBatchGenerator.hxx.

◆ fNumValidationChunks

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::fNumValidationChunks
private

Definition at line 89 of file RBatchGenerator.hxx.

◆ fNumValidationEntries

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::fNumValidationEntries
private

Definition at line 86 of file RBatchGenerator.hxx.

◆ fSetSeed

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::fSetSeed
private

Definition at line 57 of file RBatchGenerator.hxx.

◆ fShuffle

template<typename... Args>
bool TMVA::Experimental::Internal::RBatchGenerator< Args >::fShuffle
private

Definition at line 76 of file RBatchGenerator.hxx.

◆ fSumVecSizes

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::fSumVecSizes
private

Definition at line 58 of file RBatchGenerator.hxx.

◆ fTrainChunkTensor

template<typename... Args>
TMVA::Experimental::RTensor<float> TMVA::Experimental::Internal::RBatchGenerator< Args >::fTrainChunkTensor
private

Definition at line 104 of file RBatchGenerator.hxx.

◆ fTrainingChunkNum

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::fTrainingChunkNum
private

Definition at line 68 of file RBatchGenerator.hxx.

◆ fTrainingEpochActive

template<typename... Args>
bool TMVA::Experimental::Internal::RBatchGenerator< Args >::fTrainingEpochActive {false}
private

Definition at line 82 of file RBatchGenerator.hxx.

◆ fTrainTensor

template<typename... Args>
TMVA::Experimental::RTensor<float> TMVA::Experimental::Internal::RBatchGenerator< Args >::fTrainTensor
private

Definition at line 103 of file RBatchGenerator.hxx.

◆ fUseWholeFile

template<typename... Args>
bool TMVA::Experimental::Internal::RBatchGenerator< Args >::fUseWholeFile
private

Definition at line 79 of file RBatchGenerator.hxx.

◆ fValidationChunkNum

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RBatchGenerator< Args >::fValidationChunkNum
private

Definition at line 69 of file RBatchGenerator.hxx.

◆ fValidationChunkTensor

template<typename... Args>
TMVA::Experimental::RTensor<float> TMVA::Experimental::Internal::RBatchGenerator< Args >::fValidationChunkTensor
private

Definition at line 107 of file RBatchGenerator.hxx.

◆ fValidationEpochActive

template<typename... Args>
bool TMVA::Experimental::Internal::RBatchGenerator< Args >::fValidationEpochActive {false}
private

Definition at line 83 of file RBatchGenerator.hxx.

◆ fValidationSplit

template<typename... Args>
float TMVA::Experimental::Internal::RBatchGenerator< Args >::fValidationSplit
private

Definition at line 61 of file RBatchGenerator.hxx.

◆ fValidationTensor

template<typename... Args>
TMVA::Experimental::RTensor<float> TMVA::Experimental::Internal::RBatchGenerator< Args >::fValidationTensor
private

Definition at line 106 of file RBatchGenerator.hxx.

  • tmva/tmva/inc/TMVA/BatchGenerator/RBatchGenerator.hxx