tonic
tonic copied to clipboard
Compose cannot handle transforms that change data and label
Dataset
classes in tonic have a transforms
parameter, which allows passing callables that are applied to both data and labels, as opposed to transform
which is only applied to the data.
It seems that composition with the Compose
class is currently only possible for transform
-type functions that only change the data. This could be fixed easily by changing the events
parameter in the call method to *events
and adapting the function code accordingly.
That's a good point, thanks for flagging that! For a quick workaround I just used custom wrapper functions in the past