Skip to content

Commit d92e084

Browse files
autoihWindQAQ
authored andcommitted
more efficient operation (#525)
1 parent f4db0b1 commit d92e084

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tensorflow_addons/image/filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def mean_filter2d(image,
107107
# has the value of 1 for each element.
108108
area = tf.constant(
109109
filter_shape[0] * filter_shape[1], dtype=image.dtype)
110-
filter_shape = filter_shape + (tf.shape(image)[-1], 1)
110+
filter_shape += (tf.shape(image)[-1], 1)
111111
kernel = tf.ones(shape=filter_shape, dtype=image.dtype)
112112

113113
output = tf.nn.depthwise_conv2d(

0 commit comments

Comments
 (0)