Skip to content

Commit

Permalink
added exp to the Tensorflow frontend (#10455)
Browse files Browse the repository at this point in the history
Co-authored-by: Felix Hirwa Nshuti <[email protected]>
  • Loading branch information
Sravanthgithub and fnhirwa authored Feb 24, 2023
1 parent 7248f15 commit dd90a45
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ivy/functional/frontends/tensorflow/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ def add(x, y, name=None):
return ivy.add(x, y)


@to_ivy_arrays_and_back
def exp(x, name=None):
return ivy.exp(x)


@to_ivy_arrays_and_back
def argmax(input, axis, output_type=None, name=None):
output_type = to_ivy_dtype(output_type)
Expand Down
25 changes: 25 additions & 0 deletions ivy_tests/test_ivy/test_frontends/test_tensorflow/test_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,31 @@ def test_tensorflow_tan(
on_device=on_device,
x=x[0],
)


# exp
@handle_frontend_test(
fn_tree="tensorflow.math.exp",
dtype_and_x=helpers.dtype_and_values(available_dtypes=helpers.get_dtypes("float")),
test_with_out=st.just(False),
)
def test_tensorflow_exp(
*,
dtype_and_x,
frontend,
test_flags,
fn_tree,
on_device,
):
input_dtype, x = dtype_and_x
helpers.test_frontend_function(
input_dtypes=input_dtype,
frontend=frontend,
test_flags=test_flags,
fn_tree=fn_tree,
on_device=on_device,
x=x[0],
)


# multiply
Expand Down

0 comments on commit dd90a45

Please sign in to comment.