Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanxingql committed Sep 13, 2024
1 parent 09a6e45 commit e858b15
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 23 deletions.
4 changes: 3 additions & 1 deletion doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ Chinese users may use mirrors:

```bash
# for Conda: https://mirrors.tuna.tsinghua.edu.cn/help/anaconda
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ # pip

# for PyPI: https://mirrors.tuna.tsinghua.edu.cn/help/pypi/
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
```

First, create a Conda environment:
Expand Down
2 changes: 1 addition & 1 deletion powerqe/archs/identitynet_arch.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class IdentityNet(nn.Module):
"""Identity network used for testing benchmarks (in tensors). Support up-scaling."""

def __init__(self, scale=1, upscale_mode="nearest"):
super(IdentityNet, self).__init__()
super().__init__()
self.scale = scale
self.upscale_mode = upscale_mode

Expand Down
1 change: 0 additions & 1 deletion powerqe/losses/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


from basicsr.utils import get_root_logger
from basicsr.utils.registry import LOSS_REGISTRY as LOSS_REGISTRY_BASICSR

from .registry import LOSS_REGISTRY

Expand Down
21 changes: 1 addition & 20 deletions powerqe/models/qe_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,4 @@ class QEModel(SRModel):
"""Base QE model for single image quality enhancement."""

def __init__(self, opt):
super(SRModel, self).__init__(opt)

# define network
self.net_g = build_network(opt["network_g"])
self.net_g = self.model_to_device(self.net_g)
self.print_network(self.net_g)

# load pretrained models
load_path = self.opt["path"].get("pretrain_network_g", None)
if load_path is not None:
param_key = self.opt["path"].get("param_key_g", "params")
self.load_network(
self.net_g,
load_path,
self.opt["path"].get("strict_load_g", True),
param_key,
)

if self.is_train:
self.init_training_settings()
super().__init__(opt)

0 comments on commit e858b15

Please sign in to comment.