Skip to content

Commit

Permalink
more efficient operation (tensorflow#525)
Browse files Browse the repository at this point in the history
  • Loading branch information
autoih authored and WindQAQ committed Sep 19, 2019
1 parent f4db0b1 commit d92e084
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tensorflow_addons/image/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def mean_filter2d(image,
# has the value of 1 for each element.
area = tf.constant(
filter_shape[0] * filter_shape[1], dtype=image.dtype)
filter_shape = filter_shape + (tf.shape(image)[-1], 1)
filter_shape += (tf.shape(image)[-1], 1)
kernel = tf.ones(shape=filter_shape, dtype=image.dtype)

output = tf.nn.depthwise_conv2d(
Expand Down

0 comments on commit d92e084

Please sign in to comment.