Skip to content

Possible BC break by the use of torch.rand() #2520

Closed
@hkchengrex

Description

@hkchengrex

I find that random.random() was replaced by torch.rand() in some of the random transforms (e.g. RandomHorizontalFlip) not in some others (e.g. RandomGrayscale).

I believe a lot of users rely on the previous random.random() behavior by manually seeding random to apply an identical transform to the image/segmentation/etc. See this highly upvoted (and thus copied and used) comment: #9 (comment)

Existing code will still train with inferior performance and it is hard to notice. This is kind of horrible.

If the change is inevitable, maybe it can at least be mentioned in the release note?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions