add comment and static decorator (#60)

This commit is contained in:
Yifan Zhou 2022-01-11 16:44:47 +08:00 committed by GitHub
parent d157243077
commit fbce75e6bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -105,6 +105,9 @@ class MMCodebase(metaclass=ABCMeta):
pass
# Note that the build function returns the class instead of its instance.
def __build_codebase_class(codebase: Codebase, registry: Registry):
return registry.module_dict[codebase.value]

View File

@ -71,6 +71,7 @@ class MMClassification(MMCodebase):
return dataset
@staticmethod
def build_dataloader(dataset: Dataset,
samples_per_gpu: int,
workers_per_gpu: int,