Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

Inconvenient staticmethod in Dataset Class #1105

Open
minux302 opened this issue Jun 19, 2020 · 0 comments
Open

Inconvenient staticmethod in Dataset Class #1105

minux302 opened this issue Jun 19, 2020 · 0 comments

Comments

@minux302
Copy link

In Base dataset class, classes, num_classes, extend_dir are defined as static method.
So when we want to change those method, we must duplicate Dataset Class. Sometimes this is inconvenient.

For example, It is not possible to change the class for each instance as follows.

class SomethingDataset(Base):
    def __init__(self, mode):
        if mode == "debug":
            self.class = [
               "classA", "classB"
            ]
        else:
           self.class = [
               "classA", "classB", "classC", "classD", ...
            ]
   ...

Currently we must do as follows.

class SomethingDataset(Base):
   ...

class DebugSomethingDataset(Base):
   # Reproduction of SomethingDataset
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant