AttributeError: module ‘tensorflow_core.keras.activations‘ has no attribute ‘swish‘
用哈工大的LTP时,安装没问题pip install ltp,但是运行程序时出现下面错误AttributeError: module 'tensorflow_core.keras.activations' has no attribute 'swish'错误原因:应该是安装各个模块版本不匹配的问题解决方案:tf的版本我之前用的是2.0的,重新建了虚拟环境tensorflow2.3.1版本的,安装的pytorch cpu1.7.0版本的。之后再pip install ltp,重新运行程序没
原创
2020-12-14 10:59:04 ·
2224 阅读 ·
0 评论