Skip to content

An abstract class for all transforms #181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
chsasank opened this issue Jun 2, 2017 · 2 comments
Closed

An abstract class for all transforms #181

chsasank opened this issue Jun 2, 2017 · 2 comments

Comments

@chsasank
Copy link
Contributor

chsasank commented Jun 2, 2017

Shouldn't there be a base class for all transforms like torch.utils.data.Dataset?

It can be:

class Transform(object):
    def __init__():
        pass

    def __call__():
        raise NotImplementedError

This makes transforms transparent and easy to refer in other functions like Compose.

@chsasank chsasank changed the title A base class for all transforms An abstract class for all transforms Jun 2, 2017
@alykhantejani
Copy link
Contributor

alykhantejani commented Aug 17, 2017

Transforms don't necessarily have to be classes, they can be any callable (i.e. functions + classes)

@fmassa
Copy link
Member

fmassa commented Sep 3, 2017

Given the discussions in #230, I'm not sure there is a need to an abstract class. I'm closing this issue, but let me know if you think otherwise and we can re-open it.

@fmassa fmassa closed this as completed Sep 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants