Decorates a Dataset with a Transform, applied to every sample get() returns – lets Transform/Compose compose with any Dataset without modifying it or DataLoader.
More...
#include <transform.hpp>
Decorates a Dataset with a Transform, applied to every sample get() returns – lets Transform/Compose compose with any Dataset without modifying it or DataLoader.
◆ TransformDataset()
| pulsatrix::TransformDataset::TransformDataset |
( |
std::shared_ptr< Dataset > |
base, |
|
|
std::shared_ptr< Transform > |
transform |
|
) |
| |
|
inline |
◆ get()
| Sample pulsatrix::TransformDataset::get |
( |
int64_t |
index | ) |
const |
|
inlineoverridevirtual |
Loads one sample by index.
- Parameters
-
- Returns
- The sample at index.
- Exceptions
-
| std::out_of_range | if index is out of bounds – external boundary: the index is chosen by a Sampler/DataLoader from possibly-external configuration (shuffle seed, resumed epoch offset), not a compile-time-known loop bound. |
Implements pulsatrix::Dataset.
◆ size()
| int64_t pulsatrix::TransformDataset::size |
( |
| ) |
const |
|
inlineoverridevirtual |
The documentation for this class was generated from the following file: