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
add hardsigmoid to Pytorch frontend #4409
Conversation
Hi, Thanks for the PR! I like whats there so far, that looks like a nice and elegant implementation. There are a few things that need to be added though. 1.) It needs to have a test written in
2.) This function needs to have a matching function signature to the equivalent PyTorch function, so as the original is (I think) I'd like to re-iterate I do like what's there now and think it'll be great when the rest has been added, and if there's anything you need help with feel free to message me. |
The test looks mostly correct but it fails on my machine with |
Should i merge after the workflow or i should keep it up to date? |
May i get a pointer on proper implementation of the test method? The test in pytest failed but I believe the implementation is correct as the results are correct on manual testing on both the ivy frontend and the torch backend. |
Hi, what is the error you get in pytest? It looks alright at a first glance, I'll pull this version and see if it works for me |
i guess its the inplace behaviour of the function changing the input. So im not sure if the helper functions are intended to test with inplace. |
Having got it running that makes sense, I had a test failure where the values disagreed and one of them was correctly |
Other tests simply ignore testing the inplace but this seems weird. |
It looks like the other functions just pass Also very small thing, but when you update to |
Having had a quick once-over, try running |
its the comment, sorry let me quickly fix it. |
Thanks for fixing it, I fixed a merge conflict against master and re-ran the formatting tools, so if you see my commit in your branch there's nothing to be alarmed about, and it doesn't change that this is your commit and you still receive full value out of it, I just felt it was unfair for me to introduce a formatting issue and ask you to fix it. |
Closes #4263