Different approaches are discussed in e.g. this issue or this one.
My suggestion would be to use the functional transformation API, grab the parameters for each transformation, and apply it to the image and target as seen here.
Different approaches are discussed in e.g. this issue or this one.
My suggestion would be to use the functional transformation API, grab the parameters for each transformation, and apply it to the image and target as seen here.