运行实例代码出错
- Dominant language
- Python
- Stars
- 2k
- Forks
- 361
- PR merge metrics
- No merged PRs in 30d
Description
在运行实例代码时报错
from senta import Senta
my_senta = Senta()
use_cuda = True
my_senta.init_model(model_class="ernie_1.0_skep_large_ch", task="sentiment_classify", use_cuda=use_cuda)
这一步没有报错,在
texts = ["中山大学是岭南第一学府"]
result = my_senta.predict(texts)
print(result)
这一步时,报了如下错误,不知道该如何修改。
TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
1. paddle.fluid.core_avx.PaddleTensor()
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the reported example with Senta, focusing on the failing predict(texts) call after init_model. Inspect Senta.predict and the surrounding PaddleTensor usage to identify the constructor mismatch; done means the supplied example runs and prints a prediction without the TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100