pulsatrix
Loading...
Searching...
No Matches
pulsatrix::Compose Class Reference

Eager, ordered list of Transforms applied in sequence – pulsatrix's analogue of torchvision.transforms.Compose. Deliberately simple: no fusion/graph, matching Compose's own upstream design; unlike Python, there is no GIL here for that simplicity to cost anything. More...

#include <transform.hpp>

Inheritance diagram for pulsatrix::Compose:
Collaboration diagram for pulsatrix::Compose:

Public Member Functions

 Compose (std::vector< std::shared_ptr< Transform > > steps)
 
Sample apply (Sample sample) const override
 Applies this transform to a sample.
 
- Public Member Functions inherited from pulsatrix::Transform
virtual ~Transform ()=default
 

Detailed Description

Eager, ordered list of Transforms applied in sequence – pulsatrix's analogue of torchvision.transforms.Compose. Deliberately simple: no fusion/graph, matching Compose's own upstream design; unlike Python, there is no GIL here for that simplicity to cost anything.

Constructor & Destructor Documentation

◆ Compose()

pulsatrix::Compose::Compose ( std::vector< std::shared_ptr< Transform > >  steps)
inlineexplicit

Member Function Documentation

◆ apply()

Sample pulsatrix::Compose::apply ( Sample  sample) const
inlineoverridevirtual

Applies this transform to a sample.

Parameters
sampleInput sample.
Returns
The transformed sample.

Implements pulsatrix::Transform.


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