Skip to content

[minor feature] move tranforms.RandomCrop.get_params to functional #495

@karandwivedi42

Description

@karandwivedi42

For uniformity.

	# before
    i, j, h, w = transforms.RandomCrop.get_params(x, [224, 224])
    x = TF.crop(i, j, h, w)
	# after
    i, j, h, w = TF.get_random_crop_params(x, [224, 224])
    x = TF.crop(i, j, h, w)

or

x = TF.random_crop(x, [224, 224])

I can PR if it's a go-ahead from any maintainer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions