Skip to content
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

cannot import name 'soft_relu' from 'paddle.fluid.layers.nn' #64

Open
593527360 opened this issue Jun 29, 2023 · 1 comment
Open

cannot import name 'soft_relu' from 'paddle.fluid.layers.nn' #64

593527360 opened this issue Jun 29, 2023 · 1 comment

Comments

@593527360
Copy link

python=3.8.16,请问大伙有没有遇见过这种问题。

from paddle.fluid.layers.nn import soft_relu
ImportError: cannot import name 'soft_relu' from 'paddle.fluid.layers.nn'

@593527360
Copy link
Author

发现问题了,paddlepaddle版本太高,已经没有soft_relu方法。具体原因我也不祥。
首先卸载已安装的paddlepaddle
pip uninstall paddlepaddle
然后重新安装低版本,我这里装的是2.4.1
pip install paddlepaddle==2.4.1
然后就可以正常执行下去了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant