Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanxingql committed Sep 11, 2024
1 parent 09a6e45 commit 2a7f1e4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 22 deletions.
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 2a7f1e4

Please sign in to comment.