Skip to content

Commit 3c6a68b

Browse files
committed
style fixes
1 parent cb63695 commit 3c6a68b

File tree

10 files changed

+253
-306
lines changed

10 files changed

+253
-306
lines changed

keras_resnet/blocks/_1d.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
# -*- coding: utf-8 -*-
22

33
"""
4-
54
keras_resnet.blocks._1d
65
~~~~~~~~~~~~~~~~~~~~~~~
76
87
This module implements a number of popular one-dimensional residual blocks.
9-
108
"""
119

1210
import keras.layers
@@ -19,7 +17,6 @@
1917

2018
def basic_1d(filters, stage=0, block=0, kernel_size=3, numerical_name=False, stride=None):
2119
"""
22-
2320
A one-dimensional basic block.
2421
2522
:param filters: the output’s feature space
@@ -39,7 +36,6 @@ def basic_1d(filters, stage=0, block=0, kernel_size=3, numerical_name=False, str
3936
>>> import keras_resnet.blocks
4037
4138
>>> keras_resnet.blocks.basic_1d(64)
42-
4339
"""
4440
if stride is None:
4541
if block != 0 or stage == 0:
@@ -83,7 +79,6 @@ def f(x):
8379

8480
def bottleneck_1d(filters, stage=0, block=0, kernel_size=3, numerical_name=False, stride=None):
8581
"""
86-
8782
A one-dimensional bottleneck block.
8883
8984
:param filters: the output’s feature space
@@ -103,7 +98,6 @@ def bottleneck_1d(filters, stage=0, block=0, kernel_size=3, numerical_name=False
10398
>>> import keras_resnet.blocks
10499
105100
>>> keras_resnet.blocks.bottleneck_1d(64)
106-
107101
"""
108102
if stride is None:
109103
stride = 1 if block != 0 or stage == 0 else 2

keras_resnet/blocks/_2d.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
# -*- coding: utf-8 -*-
22

33
"""
4-
54
keras_resnet.blocks._2d
65
~~~~~~~~~~~~~~~~~~~~~~~
76
87
This module implements a number of popular two-dimensional residual blocks.
9-
108
"""
119

1210
import keras.layers
@@ -19,7 +17,6 @@
1917

2018
def basic_2d(filters, stage=0, block=0, kernel_size=3, numerical_name=False, stride=None):
2119
"""
22-
2320
A two-dimensional basic block.
2421
2522
:param filters: the output’s feature space
@@ -39,7 +36,6 @@ def basic_2d(filters, stage=0, block=0, kernel_size=3, numerical_name=False, str
3936
>>> import keras_resnet.blocks
4037
4138
>>> keras_resnet.blocks.basic_2d(64)
42-
4339
"""
4440
if stride is None:
4541
if block != 0 or stage == 0:
@@ -83,7 +79,6 @@ def f(x):
8379

8480
def bottleneck_2d(filters, stage=0, block=0, kernel_size=3, numerical_name=False, stride=None):
8581
"""
86-
8782
A two-dimensional bottleneck block.
8883
8984
:param filters: the output’s feature space
@@ -103,7 +98,6 @@ def bottleneck_2d(filters, stage=0, block=0, kernel_size=3, numerical_name=False
10398
>>> import keras_resnet.blocks
10499
105100
>>> keras_resnet.blocks.bottleneck_2d(64)
106-
107101
"""
108102
if stride is None:
109103
if block != 0 or stage == 0:

keras_resnet/blocks/_3d.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
# -*- coding: utf-8 -*-
22

33
"""
4-
54
keras_resnet.blocks._3d
65
~~~~~~~~~~~~~~~~~~~~~~~
76
87
This module implements a number of popular three-dimensional residual blocks.
9-
108
"""
119

1210
import keras.layers
@@ -19,7 +17,6 @@
1917

2018
def basic_3d(filters, stage=0, block=0, kernel_size=3, numerical_name=False, stride=None):
2119
"""
22-
2320
A three-dimensional basic block.
2421
2522
:param filters: the output’s feature space
@@ -39,7 +36,6 @@ def basic_3d(filters, stage=0, block=0, kernel_size=3, numerical_name=False, str
3936
>>> import keras_resnet.blocks
4037
4138
>>> keras_resnet.blocks.basic_3d(64)
42-
4339
"""
4440
if stride is None:
4541
if block != 0 or stage == 0:
@@ -83,7 +79,6 @@ def f(x):
8379

8480
def bottleneck_3d(filters, stage=0, block=0, kernel_size=3, numerical_name=False, stride=None):
8581
"""
86-
8782
A three-dimensional bottleneck block.
8883
8984
:param filters: the output’s feature space
@@ -103,7 +98,6 @@ def bottleneck_3d(filters, stage=0, block=0, kernel_size=3, numerical_name=False
10398
>>> import keras_resnet.blocks
10499
105100
>>> keras_resnet.blocks.bottleneck_3d(64)
106-
107101
"""
108102
if stride is None:
109103
if block != 0 or stage == 0:

keras_resnet/blocks/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
# -*- coding: utf-8 -*-
22

33
"""
4-
54
keras_resnet.blocks
65
~~~~~~~~~~~~~~~~~~~
76
87
This module implements a number of popular residual blocks.
9-
108
"""
119

1210
from ._1d import (

keras_resnet/blocks/_time_distributed_2d.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
# -*- coding: utf-8 -*-
22

33
"""
4-
54
keras_resnet.blocks._time_distributed_2d
65
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
76
87
This module implements a number of popular time distributed two-dimensional residual blocks.
9-
108
"""
119

1210
import keras.layers

keras_resnet/classifiers/_2d.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
# -*- coding: utf-8 -*-
22

33
"""
4-
54
keras_resnet.classifiers
65
~~~~~~~~~~~~~~~~~~~~~~~~
76
87
This module implements popular residual two-dimensional classifiers.
9-
108
"""
119

1210
import keras.backend
@@ -19,7 +17,6 @@
1917

2018
class ResNet18(keras.models.Model):
2119
"""
22-
2320
A :class:`ResNet18 <ResNet18>` object.
2421
2522
:param inputs: input tensor (e.g. an instance of `keras.layers.Input`)
@@ -35,9 +32,7 @@ class ResNet18(keras.models.Model):
3532
>>> model = keras_resnet.classifiers.ResNet18(x)
3633
3734
>>> model.compile("adam", "categorical_crossentropy", ["accuracy"])
38-
3935
"""
40-
4136
def __init__(self, inputs, classes):
4237
outputs = keras_resnet.models.ResNet18(inputs)
4338

@@ -50,7 +45,6 @@ def __init__(self, inputs, classes):
5045

5146
class ResNet34(keras.models.Model):
5247
"""
53-
5448
A :class:`ResNet34 <ResNet34>` object.
5549
5650
:param inputs: input tensor (e.g. an instance of `keras.layers.Input`)
@@ -66,9 +60,7 @@ class ResNet34(keras.models.Model):
6660
>>> model = keras_resnet.classifiers.ResNet34(x)
6761
6862
>>> model.compile("adam", "categorical_crossentropy", ["accuracy"])
69-
7063
"""
71-
7264
def __init__(self, inputs, classes):
7365
outputs = keras_resnet.models.ResNet34(inputs)
7466

@@ -81,7 +73,6 @@ def __init__(self, inputs, classes):
8173

8274
class ResNet50(keras.models.Model):
8375
"""
84-
8576
A :class:`ResNet50 <ResNet50>` object.
8677
8778
:param inputs: input tensor (e.g. an instance of `keras.layers.Input`)
@@ -97,9 +88,7 @@ class ResNet50(keras.models.Model):
9788
>>> model = keras_resnet.classifiers.ResNet50(x)
9889
9990
>>> model.compile("adam", "categorical_crossentropy", ["accuracy"])
100-
10191
"""
102-
10392
def __init__(self, inputs, classes):
10493
outputs = keras_resnet.models.ResNet50(inputs)
10594

@@ -112,7 +101,6 @@ def __init__(self, inputs, classes):
112101

113102
class ResNet101(keras.models.Model):
114103
"""
115-
116104
A :class:`ResNet101 <ResNet101>` object.
117105
118106
:param inputs: input tensor (e.g. an instance of `keras.layers.Input`)
@@ -128,9 +116,7 @@ class ResNet101(keras.models.Model):
128116
>>> model = keras_resnet.classifiers.ResNet101(x)
129117
130118
>>> model.compile("adam", "categorical_crossentropy", ["accuracy"])
131-
132119
"""
133-
134120
def __init__(self, inputs, classes):
135121
outputs = keras_resnet.models.ResNet101(inputs)
136122

@@ -143,7 +129,6 @@ def __init__(self, inputs, classes):
143129

144130
class ResNet152(keras.models.Model):
145131
"""
146-
147132
A :class:`ResNet152 <ResNet152>` object.
148133
149134
:param inputs: input tensor (e.g. an instance of `keras.layers.Input`)
@@ -161,7 +146,6 @@ class ResNet152(keras.models.Model):
161146
>>> model.compile("adam", "categorical_crossentropy", ["accuracy"])
162147
163148
"""
164-
165149
def __init__(self, inputs, classes):
166150
outputs = keras_resnet.models.ResNet152(inputs)
167151

@@ -174,7 +158,6 @@ def __init__(self, inputs, classes):
174158

175159
class ResNet200(keras.models.Model):
176160
"""
177-
178161
A :class:`ResNet200 <ResNet200>` object.
179162
180163
:param inputs: input tensor (e.g. an instance of `keras.layers.Input`)
@@ -190,9 +173,7 @@ class ResNet200(keras.models.Model):
190173
>>> model = keras_resnet.classifiers.ResNet200(x)
191174
192175
>>> model.compile("adam", "categorical_crossentropy", ["accuracy"])
193-
194176
"""
195-
196177
def __init__(self, inputs, classes):
197178
outputs = keras_resnet.models.ResNet200(inputs)
198179

keras_resnet/classifiers/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
# -*- coding: utf-8 -*-
22

33
"""
4-
54
keras_resnet.classifiers
65
~~~~~~~~~~~~~~~~~~~~~~~~
76
87
This module implements popular residual classifiers.
9-
108
"""
119

1210
from ._2d import (

0 commit comments

Comments
 (0)