Skip to content

Commit

Permalink
Use setter instead of set_classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
dekked authored and nagitsu committed Aug 24, 2018
1 parent b5f932f commit 41b5960
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,14 @@ def classes(self):
self._classes = self.get_classes()
return self._classes

@classes.setter
def classes(self, classes):
self._classes = classes

@abc.abstractmethod
def get_total(self):
"""
Returns the total amount of records in the dataset.
Returns the total number of records in the dataset.
"""

@abc.abstractmethod
Expand Down Expand Up @@ -129,6 +133,3 @@ def iterate(self):
xmax (int): x value for bottom-right point.
ymax (int): y value for bottom-right point.
"""

def set_classes(self, classes):
self._classes = classes
2 changes: 1 addition & 1 deletion luminoth/tools/dataset/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def transform(dataset_reader, data_dir, output_dir, splits, only_classes,
classes = split_reader.classes
else:
# Overwrite classes after first split for consistency.
split_reader.set_classes(classes)
split_reader.classes = classes

# We assume we are saving object detection objects, but it should
# be easy to modify once we have different types of objects.
Expand Down

0 comments on commit 41b5960

Please sign in to comment.