Skip to content

Commit

Permalink
Remove the duplicate relu6 in tensorflow frontend's nn submodule (#11791
Browse files Browse the repository at this point in the history
)
  • Loading branch information
vedpatwardhan committed Mar 6, 2023
1 parent d2e3d42 commit edcecb2
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions ivy/functional/frontends/tensorflow/nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,19 @@ def separable_conv2d(
padding,
data_format=None,
dilations=None,
name=None
name=None,
):
dilations = 1 if dilations is None else dilations
strides, dilations = _reduce_strides_dilations(2, strides, dilations)
ret = depthwise_conv2d(input, depthwise_filter, strides=strides, padding=padding,
dilations=dilations, data_format=data_format)
return conv2d(ret, pointwise_filter, 1, 'SAME', data_format=data_format)
ret = depthwise_conv2d(
input,
depthwise_filter,
strides=strides,
padding=padding,
dilations=dilations,
data_format=data_format,
)
return conv2d(ret, pointwise_filter, 1, "SAME", data_format=data_format)


@to_ivy_arrays_and_back
Expand All @@ -205,7 +211,7 @@ def batch_normalization(x, mean, variance, offset, scale, variance_epsilon, name
scale=scale,
eps=variance_epsilon,
)
return ivy.permute_dims(ret, axes=(0, ndims-1, *range(1, ndims-1)))
return ivy.permute_dims(ret, axes=(0, ndims - 1, *range(1, ndims - 1)))


@to_ivy_arrays_and_back
Expand Down Expand Up @@ -476,8 +482,3 @@ def relu6(features, name=None):
@to_ivy_arrays_and_back
def softmax(logits, axis=None, name=None):
return ivy.softmax(logits, axis=axis)


@to_ivy_arrays_and_back
def relu6(features, name=None):
return ivy.clip(features, 0, 6)

0 comments on commit edcecb2

Please sign in to comment.