Skip to content
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

fix testing procedure #42

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hat/archs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
arch_folder = osp.dirname(osp.abspath(__file__))
arch_filenames = [osp.splitext(osp.basename(v))[0] for v in scandir(arch_folder) if v.endswith('_arch.py')]
# import all the arch modules
_arch_modules = [importlib.import_module(f'hat.archs.{file_name}') for file_name in arch_filenames]
_arch_modules = [importlib.import_module(f'archs.{file_name}') for file_name in arch_filenames]
2 changes: 1 addition & 1 deletion hat/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
data_folder = osp.dirname(osp.abspath(__file__))
dataset_filenames = [osp.splitext(osp.basename(v))[0] for v in scandir(data_folder) if v.endswith('_dataset.py')]
# import all the dataset modules
_dataset_modules = [importlib.import_module(f'hat.data.{file_name}') for file_name in dataset_filenames]
_dataset_modules = [importlib.import_module(f'data.{file_name}') for file_name in dataset_filenames]
3 changes: 2 additions & 1 deletion hat/data/imagenet_paired_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
from basicsr.data.data_util import paths_from_lmdb, scandir
from basicsr.data.transforms import augment, paired_random_crop
from basicsr.utils import FileClient, imfrombytes, img2tensor
from basicsr.utils.matlab_functions import imresize, rgb2ycbcr
from basicsr.utils.matlab_functions import imresize
from basicsr.utils.color_util import rgb2ycbcr
from basicsr.utils.registry import DATASET_REGISTRY


Expand Down
2 changes: 1 addition & 1 deletion hat/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
model_folder = osp.dirname(osp.abspath(__file__))
model_filenames = [osp.splitext(osp.basename(v))[0] for v in scandir(model_folder) if v.endswith('_model.py')]
# import all the model modules
_model_modules = [importlib.import_module(f'hat.models.{file_name}') for file_name in model_filenames]
_model_modules = [importlib.import_module(f'models.{file_name}') for file_name in model_filenames]
6 changes: 3 additions & 3 deletions hat/test.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# flake8: noqa
import os.path as osp

import hat.archs
import hat.data
import hat.models
import archs
import data
import models
from basicsr.test import test_pipeline

if __name__ == '__main__':
Expand Down