ivy icon indicating copy to clipboard operation
ivy copied to clipboard

feat: Add tensorflow GatherNd raw_ops

Open TalhaKhalil opened this issue 1 year ago • 5 comments

PR Description

Related Issue

Closes #27443

Checklist

  • [x] Did you add a function?
  • [x] Did you add the tests?
  • [x] Did you run your tests and are your tests passing?
  • [x] Did pre-commit not fail on any check?
  • [x] Did you follow the steps we provided?

Socials

TalhaKhalil avatar Dec 13 '23 13:12 TalhaKhalil

Hi @he11owthere,

Hope you are doing well,

So, I had implemented GatherNd in raw ops for tensorflow. But the issue I am currently facing is that out of 5 tests sometimes 4 or 3 are passing. I am not quite sure what the problem is exactly and why they are not passing 100%.

Would really appreciate if you could help me out with this.

TalhaKhalil avatar Dec 13 '23 15:12 TalhaKhalil

@he11owthere I changed these parameters in the test function but as of now none of the tests are passing

TalhaKhalil avatar Dec 19 '23 12:12 TalhaKhalil

@he11owthere I changed these parameters in the test function but as of now none of the tests are passing

For me, all the tests are passing with these values:

min_num_dims=3,
max_num_dims=3,
min_dim_size=3,
max_dim_size=3,
axis_zero=True,
disable_random_axis=True,
indices_same_dims=True,

The issue is that indices are sometimes trying to access invalid dimensions since the overall shape of the tensor might differ for both the params as well as indices and they are so much dependent on each other while we are trying to generate their values. After making these changes, you will have to include a with_supported_dtypes decorator and add appropriate data types after running the tests.

he11owthere avatar Dec 20 '23 17:12 he11owthere

@he11owthere Can you tell me the the data types to be included along with the decorator with_supported_dtypes .

TalhaKhalil avatar Dec 20 '23 18:12 TalhaKhalil

@he11owthere Can you tell me the the data types to be included along with the decorator with_supported_dtypes .

You will have to run the tests and will face errors regarding unsupported data types like int16 is not supported by some backend so you will get to know which data types are supported and which are not. For now, add int32, int64, float32 and float64 data types inside that decorator.

he11owthere avatar Dec 20 '23 18:12 he11owthere