mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
Fix mypy
errors in maths/gaussian_error_linear_unit.py
(#8610)
* updating DIRECTORY.md * Fix mypy errors in gaussian_error_linear_unit.py * updating DIRECTORY.md * updating DIRECTORY.md --------- Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
parent
5c276a8377
commit
beb43517c3
@ -30,12 +30,10 @@ def gaussian_error_linear_unit(vector: np.ndarray) -> np.ndarray:
|
|||||||
Implements the Gaussian Error Linear Unit (GELU) function
|
Implements the Gaussian Error Linear Unit (GELU) function
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
vector (np.array): A numpy array of shape (1,n)
|
vector (np.ndarray): A numpy array of shape (1, n) consisting of real values
|
||||||
consisting of real values
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
gelu_vec (np.array): The input numpy array, after applying
|
gelu_vec (np.ndarray): The input numpy array, after applying gelu
|
||||||
gelu.
|
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
>>> gaussian_error_linear_unit(np.array([-1.0, 1.0, 2.0]))
|
>>> gaussian_error_linear_unit(np.array([-1.0, 1.0, 2.0]))
|
||||||
|
Loading…
Reference in New Issue
Block a user