feat: impl backprop for erf and gelu-erf (#1258)

* impl backprop for erf anf gelu-erf

* feat: unary tests added for erf and gelu-erf

* fix: (clippy) remove immediately dereferenced ref

* fix: improve comments with pytorch code snippet

* fix: adjust comment typo in backprop impl
This commit is contained in:
drbh
2023-11-03 16:32:30 -04:00
committed by GitHub
parent ad63f20781
commit 3173b1ce3b
3 changed files with 59 additions and 3 deletions

View File

@ -641,6 +641,8 @@ impl UnaryOpT for Gelu {
}
}
/// `erf` operation
/// <https://en.wikipedia.org/wiki/Error_function>
impl UnaryOpT for Erf {
const NAME: &'static str = "erf";
const KERNEL: &'static str = "uerf";