Skip to content

Commit

Permalink
Fix TFDWConv() c1 == c2 check (#7842)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed May 16, 2022
1 parent fb7fa5b commit 2b64b45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions models/tf.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ def call(self, inputs):

class TFDWConv(keras.layers.Layer):
# Depthwise convolution
def __init__(self, c1, c2, k=1, s=1, p=None, g=1, act=True, w=None):
def __init__(self, c1, c2, k=1, s=1, p=None, act=True, w=None):
# ch_in, ch_out, weights, kernel, stride, padding, groups
super().__init__()
assert g == c1 == c2, f'TFDWConv() groups={g} must equal input={c1} and output={c2} channels'
assert c1 == c2, f'TFDWConv() input={c1} must equal output={c2} channels'
conv = keras.layers.DepthwiseConv2D(
kernel_size=k,
strides=s,
Expand Down

0 comments on commit 2b64b45

Please sign in to comment.