Public Member Functions | Public Attributes | List of all members
ecvl::Split Class Reference

Split of a dataset. This class provides the name of the split and the indices of the samples that belong to this split. It optionally provides the split type if the split name is one of training, validation or test. More...

#include <dataset_parser.h>

Public Member Functions

 Split ()=default
 
 Split (const std::string &split_name, const std::vector< int > &samples_indices, const bool drop_last=false, const bool no_label=false)
 
void SetNumBatches (int batch_size)
 
void SetLastBatch (int batch_size)
 

Public Attributes

std::string split_name_
 Name of the split. More...
 
optional< SplitTypesplit_type_
 If the split is training, validation or test the corresponding SpitType is provided. More...
 
std::vector< int > samples_indices_
 Vector containing samples indices of the split. More...
 
bool drop_last_ = false
 Whether to drop elements that don't fit batch size or not. More...
 
int num_batches_
 Number of batches of this split. More...
 
int last_batch_
 Dimension of the last batch of this split. More...
 
bool no_label_ = false
 Whether the split has samples with labels or not. More...
 

Detailed Description

Split of a dataset. This class provides the name of the split and the indices of the samples that belong to this split. It optionally provides the split type if the split name is one of training, validation or test.

Definition at line 84 of file dataset_parser.h.

Constructor & Destructor Documentation

◆ Split() [1/2]

ecvl::Split::Split ( )
default

◆ Split() [2/2]

ecvl::Split::Split ( const std::string &  split_name,
const std::vector< int > &  samples_indices,
const bool  drop_last = false,
const bool  no_label = false 
)
inline
Parameters
[in]split_nameName of the split.
[in]samples_indicesVector containing samples indices of the split.
[in]drop_lastWhether to drop elements that don't fit batch size or not.
[in]no_labelWhether the split has samples with labels or not.

Definition at line 103 of file dataset_parser.h.

Member Function Documentation

◆ SetLastBatch()

void ecvl::Split::SetLastBatch ( int  batch_size)
inline

Definition at line 116 of file dataset_parser.h.

◆ SetNumBatches()

void ecvl::Split::SetNumBatches ( int  batch_size)
inline

Definition at line 111 of file dataset_parser.h.

Member Data Documentation

◆ drop_last_

bool ecvl::Split::drop_last_ = false

Whether to drop elements that don't fit batch size or not.

Definition at line 90 of file dataset_parser.h.

◆ last_batch_

int ecvl::Split::last_batch_

Dimension of the last batch of this split.

Definition at line 92 of file dataset_parser.h.

◆ no_label_

bool ecvl::Split::no_label_ = false

Whether the split has samples with labels or not.

Definition at line 93 of file dataset_parser.h.

◆ num_batches_

int ecvl::Split::num_batches_

Number of batches of this split.

Definition at line 91 of file dataset_parser.h.

◆ samples_indices_

std::vector<int> ecvl::Split::samples_indices_

Vector containing samples indices of the split.

Definition at line 89 of file dataset_parser.h.

◆ split_name_

std::string ecvl::Split::split_name_

Name of the split.

Definition at line 87 of file dataset_parser.h.

◆ split_type_

optional<SplitType> ecvl::Split::split_type_

If the split is training, validation or test the corresponding SpitType is provided.

Definition at line 88 of file dataset_parser.h.


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