mirror of
https://github.com/ultralytics/yolov5.git
synced 2025-06-03 14:49:29 +08:00
Fix TFDWConv() c1 == c2
check (#7842)
This commit is contained in:
parent
fb7fa5be8b
commit
2b64b45cd8
@ -88,10 +88,10 @@ class TFConv(keras.layers.Layer):
|
|||||||
|
|
||||||
class TFDWConv(keras.layers.Layer):
|
class TFDWConv(keras.layers.Layer):
|
||||||
# Depthwise convolution
|
# 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
|
# ch_in, ch_out, weights, kernel, stride, padding, groups
|
||||||
super().__init__()
|
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(
|
conv = keras.layers.DepthwiseConv2D(
|
||||||
kernel_size=k,
|
kernel_size=k,
|
||||||
strides=s,
|
strides=s,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user