Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor changes to the helpers to enable gradient testing #6137

Merged
merged 1 commit into from
Oct 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions ivy_tests/test_ivy/helpers/function_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,12 +357,7 @@ def test_function(
raise e
ivy.unset_backend()
# gradient test
if (
test_gradients
and not fw == "numpy"
and all(as_variable_flags)
and not instance_method
):
if test_gradients and not fw == "numpy" and not instance_method:
gradient_test(
fn_name=fn_name,
all_as_kwargs_np=all_as_kwargs_np,
Expand Down Expand Up @@ -851,9 +846,6 @@ def grad_fn(xs):
len(grads_np_from_gt_flat),
)

if len(grads_np_flat) < 2:
return

for grad_np_flat, grad_np_from_gt_flat in zip(grads_np_flat, grads_np_from_gt_flat):
value_test(
ret_np_flat=grad_np_flat,
Expand Down