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

安裝完後tensorflow 為 2.16 版,執行出錯,錯誤為 tf.nn.rnn_cell.LSTMCell is deprecated. #50

Open
edwardchen71 opened this issue Mar 12, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@edwardchen71
Copy link

edwardchen71 commented Mar 12, 2024

使用官方文件安裝方式 pip install -U ckiptagger[tf,gdown]
tensorflow 會安裝最新版本,但執行程式時會出現錯誤, 原因為 tf.nn.rnn_cell.LSTMCell is deprecated.

@jacobvsdanniel
Copy link
Collaborator

tf.compat.v1.nn.rnn_cell.LSTMCell在2.15版還有,最新版可能已經沒有了

@jacobvsdanniel jacobvsdanniel added bug Something isn't working documentation Improvements or additions to documentation and removed bug Something isn't working labels Apr 1, 2024
@yui1227
Copy link

yui1227 commented Jun 3, 2024

我的解法是先

pip install tf_keras

然後在程式碼開頭補上

import os
os.environ["TF_USE_LEGACY_KERAS"]='1'

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

No branches or pull requests

3 participants