Open kayzhou opened 3 years ago
执行 jieba.enable_paddle() 报错
AssertionError: In PaddlePaddle 2.x, we turn on dynamic graph mode by default, and 'data()' is only supported in static graph mode. So if you want to use this api, please call 'paddle.enable_static()' before this api to enter static graph mode.
在 /jieba/lac_small/predict.py 中的 开头找到
import paddle 在这一行后加入 paddle.enable_static() 就可以解决这个问题了
import paddle
paddle.enable_static()
执行 jieba.enable_paddle() 报错
AssertionError: In PaddlePaddle 2.x, we turn on dynamic graph mode by default, and 'data()' is only supported in static graph mode. So if you want to use this api, please call 'paddle.enable_static()' before this api to enter static graph mode.