Open glennmoy opened 3 years ago
Something like
"""
CustomTransform <: Transform
Apply the function passed in to CustomTransform as the transform.
"""
struct CustomTransform <: Transform
transform_function::Function
args
end
function _apply!(x::AbstractArray, CT::CustomTransform; kwargs...)
return CT.transform_function(x, ct.args...; kwargs...)
end
As mentioned in #5 and #6, a
CustomTransform
(or some other name) would be useful when one wants to apply some custom function to their data.This would be quite useful since we then wouldn't have to write a new Transform for each of these.
TODO: MWE