Skip to content

Commit

Permalink
Codacy complains
Browse files Browse the repository at this point in the history
  • Loading branch information
georgeyiasemis committed Nov 9, 2023
1 parent b1d6773 commit 7443440
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
1 change: 0 additions & 1 deletion direct/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
from direct.utils.events import CommonMetricPrinter, EventStorage, JSONWriter, TensorboardWriter, get_event_storage
from direct.utils.io import write_json


logging.captureWarnings(True)


Expand Down
3 changes: 2 additions & 1 deletion direct/functionals/ssim.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
# All rights reserved.
# Some changes are made to work together with DIRECT.

# pylint: disable=too-many-locals

import torch
import torch.nn as nn
import torch.nn.functional as F
Expand Down Expand Up @@ -95,7 +97,6 @@ def forward(self, input_data: torch.Tensor, target_data: torch.Tensor, data_rang
-------
torch.Tensor
"""
# pylint: disable=too-many-locals
data_range = data_range[:, None, None, None, None]
C1 = (self.k1 * data_range) ** 2
C2 = (self.k2 * data_range) ** 2
Expand Down
24 changes: 12 additions & 12 deletions direct/nn/conv/conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,18 +202,6 @@ def __init__(
adjust_scale=False,
**kwargs,
):
super().__init__(
in_channels,
out_channels,
kernel_size,
stride,
padding,
output_padding,
groups,
bias,
dilation,
**kwargs,
)
"""Inits :class:`CWNConvTranspose2d`.
Parameters
Expand All @@ -239,6 +227,18 @@ def __init__(
adjust_scale : bool, optional
If True, the scale factor is adjusted as a learnable parameter. Default: False.
"""
super().__init__(
in_channels,
out_channels,
kernel_size,
stride,
padding,
output_padding,
groups,
bias,
dilation,
**kwargs,
)
self.weight_normalization = CWNorm()
self.scale_ = torch.ones(in_channels, 1, 1, 1).fill_(n_scale)
if adjust_scale:
Expand Down

0 comments on commit 7443440

Please sign in to comment.