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

Add support for tensorflow v2 or above? #28

Closed
hms5232 opened this issue Aug 11, 2020 · 4 comments
Closed

Add support for tensorflow v2 or above? #28

hms5232 opened this issue Aug 11, 2020 · 4 comments

Comments

@hms5232
Copy link

hms5232 commented Aug 11, 2020

您好:最近在嘗試使用這個套件,在分析文本階段會不斷出現下列錯誤:
AttributeError: 'WS' object has no attribute 'model'

AttributeError: module 'tensorflow' has no attribute 'variable_scope'
等等的錯誤。
在查詢後發現我使用的 tensorflow 版本為 2.3.0 ,和 README 中提及的版本需求不符(貌似 2 以上都會有這個問題,參考 #17 (comment) ),因此決定降版。但在過程中發現最低只能降到 2.2.0,才發現原來是 Python 3.8 不支援 tensorflow 2.2 之前的版本(ref)。雖然降板可能可以解決此問題,但還是希望日後或許能增加對新版 tensorflow 的支援(或期望 Python 3.8 能用舊版的 tensorflow 了)

@jacobvsdanniel jacobvsdanniel added the good first issue Good for newcomers label Aug 11, 2020
@p208p2002
Copy link
Contributor

@hms5232
你好, 我最近也有遇到同樣的問題然後有改了一個tf2的相容版本,可以參考一下
https://github.com/p208p2002/ckiptagger

@hms5232
Copy link
Author

hms5232 commented Aug 25, 2020

@hms5232
你好, 我最近也有遇到同樣的問題然後有改了一個tf2的相容版本,可以參考一下
https://github.com/p208p2002/ckiptagger

感謝提供方法,有空的時候我再來試試
目前是先安裝 Python 3.7 版在我的 Ubuntu 20.04 上解決這個問題

@jacobvsdanniel
Copy link
Collaborator

jacobvsdanniel commented Sep 9, 2020

Merged with #27。目前版本和TensorFlow 1.15及2.3皆相容。

@jacobvsdanniel jacobvsdanniel removed the good first issue Good for newcomers label Sep 9, 2020
@hms5232
Copy link
Author

hms5232 commented Sep 10, 2020

非常感謝!實際測試在下面環境下可以成功運作!

  • Python==3.8
  • ckiptagger==0.2.1
  • ensorflow==2.3.0

另外 README 中關於環境需求的部份可能也要記得更新一下囉

@hms5232 hms5232 closed this as completed Sep 10, 2020
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

3 participants