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

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#118)
Browse files Browse the repository at this point in the history
* [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>
  • Loading branch information
pre-commit-ci[bot] authored Aug 9, 2022
1 parent 201eefe commit 4cdd8ac
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_language_version:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.3.0
hooks:
# list of supported hooks: https://pre-commit.com/hooks.html
- id: trailing-whitespace
Expand All @@ -24,7 +24,7 @@ repos:
"satflow",
]
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
rev: 5.0.4
hooks:
- id: flake8
args:
Expand All @@ -42,14 +42,14 @@ repos:
- id: isort
args: [--profile, black, --line-length, "100", "satflow"]
- repo: https://github.com/psf/black
rev: 21.12b0
rev: 22.6.0
hooks:
- id: black
args: [--line-length, "100"]

# yaml formatting
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.5.1
rev: v2.7.1
hooks:
- id: prettier
types: [yaml]
4 changes: 2 additions & 2 deletions satflow/models/gan/discriminators.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def __init__(
nf_mult_prev = 1
for n in range(1, n_layers): # gradually increase the number of filters
nf_mult_prev = nf_mult
nf_mult = min(2 ** n, 8)
nf_mult = min(2**n, 8)
if conv_type == "antialiased":
block = [
conv2d(
Expand Down Expand Up @@ -201,7 +201,7 @@ def __init__(
sequence += block

nf_mult_prev = nf_mult
nf_mult = min(2 ** n_layers, 8)
nf_mult = min(2**n_layers, 8)
sequence += [
conv2d(
ndf * nf_mult_prev,
Expand Down
4 changes: 2 additions & 2 deletions satflow/models/gan/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def __init__(

n_downsampling = 2
for i in range(n_downsampling): # add downsampling layers
mult = 2 ** i
mult = 2**i
if conv_type == "antialiased":
block = [
conv2d(
Expand Down Expand Up @@ -144,7 +144,7 @@ def __init__(

model += block

mult = 2 ** n_downsampling
mult = 2**n_downsampling
for i in range(n_blocks): # add ResNet blocks

model += [
Expand Down
2 changes: 1 addition & 1 deletion satflow/models/layers/Attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def __init__(self, in_dim, activation=F.relu, pooling_factor=2): # TODO for bet
self.value_conv = nn.Conv3d(in_channels=in_dim, out_channels=in_dim, kernel_size=1)

self.pooling = nn.MaxPool3d(kernel_size=2, stride=pooling_factor)
self.pooling_factor = pooling_factor ** 3
self.pooling_factor = pooling_factor**3

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

Expand Down
6 changes: 3 additions & 3 deletions satflow/models/layers/Discriminator.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def __init__(
):
super().__init__()

gain = 2 ** 0.5
gain = 2**0.5

self.conv0 = SpectralNorm(
nn.Conv2d(
Expand Down Expand Up @@ -329,7 +329,7 @@ def __init__(
):
super().__init__()

gain = 2 ** 0.5
gain = 2**0.5

self.conv0 = SpectralNorm(
nn.Conv3d(
Expand Down Expand Up @@ -393,7 +393,7 @@ class TemporalDiscriminator(nn.Module):
def __init__(self, chn=128, n_class=4):
super().__init__()

gain = 2 ** 0.5
gain = 2**0.5

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

0 comments on commit 4cdd8ac

Please sign in to comment.