-
Notifications
You must be signed in to change notification settings - Fork 14
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
'GELU' object has no attribute 'approximate' #1
Comments
You could try to switch your pytorch version to "1.11.0". |
Hello. Unfortunately, I need the latest version of torch for other functions in my project. Also version 1.11.0 is not available for download with pip and requires reinstallation of other libraries in my project. Is there anything else i could do? I didnt find good answer on the internet. |
Hello. Same problem with pytorch 2.0.1 |
Hi guys, This error is because the as following function and worked for me. class GELU(Module):
r"""Applies the Gaussian Error Linear Units function:
.. math:: \text{GELU}(x) = x * \Phi(x)
where :math:`\Phi(x)` is the Cumulative Distribution Function for Gaussian Distribution.
Shape:
- Input: :math:`(N, *)` where `*` means, any number of additional
dimensions
- Output: :math:`(N, *)`, same shape as the input
.. image:: ../scripts/activation_images/GELU.png
Examples::
>>> m = nn.GELU()
>>> input = torch.randn(2)
>>> output = m(input)
"""
def forward(self, input: Tensor) -> Tensor:
return F.gelu(input) I saw this solution here. |
i have followed the steps but its showing me this error 'GELU' object has no attribute 'approximate'
The text was updated successfully, but these errors were encountered: