Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Commit 4cdd8ac

Browse files
[pre-commit.ci] pre-commit autoupdate (#118)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/pre-commit/pre-commit-hooks: v4.1.0 → v4.3.0](pre-commit/pre-commit-hooks@v4.1.0...v4.3.0) - [github.com/PyCQA/flake8: 4.0.1 → 5.0.4](PyCQA/flake8@4.0.1...5.0.4) - [github.com/psf/black: 21.12b0 → 22.6.0](psf/black@21.12b0...22.6.0) - [github.com/pre-commit/mirrors-prettier: v2.5.1 → v2.7.1](pre-commit/mirrors-prettier@v2.5.1...v2.7.1) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 201eefe commit 4cdd8ac

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ default_language_version:
33

44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v4.1.0
6+
rev: v4.3.0
77
hooks:
88
# list of supported hooks: https://pre-commit.com/hooks.html
99
- id: trailing-whitespace
@@ -24,7 +24,7 @@ repos:
2424
"satflow",
2525
]
2626
- repo: https://github.com/PyCQA/flake8
27-
rev: 4.0.1
27+
rev: 5.0.4
2828
hooks:
2929
- id: flake8
3030
args:
@@ -42,14 +42,14 @@ repos:
4242
- id: isort
4343
args: [--profile, black, --line-length, "100", "satflow"]
4444
- repo: https://github.com/psf/black
45-
rev: 21.12b0
45+
rev: 22.6.0
4646
hooks:
4747
- id: black
4848
args: [--line-length, "100"]
4949

5050
# yaml formatting
5151
- repo: https://github.com/pre-commit/mirrors-prettier
52-
rev: v2.5.1
52+
rev: v2.7.1
5353
hooks:
5454
- id: prettier
5555
types: [yaml]

satflow/models/gan/discriminators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def __init__(
170170
nf_mult_prev = 1
171171
for n in range(1, n_layers): # gradually increase the number of filters
172172
nf_mult_prev = nf_mult
173-
nf_mult = min(2 ** n, 8)
173+
nf_mult = min(2**n, 8)
174174
if conv_type == "antialiased":
175175
block = [
176176
conv2d(
@@ -201,7 +201,7 @@ def __init__(
201201
sequence += block
202202

203203
nf_mult_prev = nf_mult
204-
nf_mult = min(2 ** n_layers, 8)
204+
nf_mult = min(2**n_layers, 8)
205205
sequence += [
206206
conv2d(
207207
ndf * nf_mult_prev,

satflow/models/gan/generators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def __init__(
113113

114114
n_downsampling = 2
115115
for i in range(n_downsampling): # add downsampling layers
116-
mult = 2 ** i
116+
mult = 2**i
117117
if conv_type == "antialiased":
118118
block = [
119119
conv2d(
@@ -144,7 +144,7 @@ def __init__(
144144

145145
model += block
146146

147-
mult = 2 ** n_downsampling
147+
mult = 2**n_downsampling
148148
for i in range(n_blocks): # add ResNet blocks
149149

150150
model += [

satflow/models/layers/Attention.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def __init__(self, in_dim, activation=F.relu, pooling_factor=2): # TODO for bet
122122
self.value_conv = nn.Conv3d(in_channels=in_dim, out_channels=in_dim, kernel_size=1)
123123

124124
self.pooling = nn.MaxPool3d(kernel_size=2, stride=pooling_factor)
125-
self.pooling_factor = pooling_factor ** 3
125+
self.pooling_factor = pooling_factor**3
126126

127127
self.gamma = nn.Parameter(torch.zeros(1))
128128

satflow/models/layers/Discriminator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def __init__(
168168
):
169169
super().__init__()
170170

171-
gain = 2 ** 0.5
171+
gain = 2**0.5
172172

173173
self.conv0 = SpectralNorm(
174174
nn.Conv2d(
@@ -329,7 +329,7 @@ def __init__(
329329
):
330330
super().__init__()
331331

332-
gain = 2 ** 0.5
332+
gain = 2**0.5
333333

334334
self.conv0 = SpectralNorm(
335335
nn.Conv3d(
@@ -393,7 +393,7 @@ class TemporalDiscriminator(nn.Module):
393393
def __init__(self, chn=128, n_class=4):
394394
super().__init__()
395395

396-
gain = 2 ** 0.5
396+
gain = 2**0.5
397397

398398
self.pre_conv = nn.Sequential(
399399
SpectralNorm(nn.Conv3d(3, 2 * chn, 3, padding=1)),

0 commit comments

Comments
 (0)