Skip to content

Avoid heavy random computation if _do_transform=False #3082

@Nic-Ma

Description

@Nic-Ma

Is your feature request related to a problem? Please describe.
Currently, we always execute random computation in randomize() no matter _do_transform is True or False.
I think we should avoid some heavy computation, for example: generating random array with the same size as img.
It would be OK if only generate 1 random number for scaling or filter, etc.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions