admin管理员组文章数量:1123504
I have trained an ALS model using the implicit package with GPU support. However, when evaluating the model using the ndcg_at_k function, I encountered the following error:
from implicit.evaluation import ndcg_at_k, mean_average_precision_at_k
ndcg = ndcg_at_k(model, train_user_items, test_user_items, K=14, show_progress=True, num_threads=1)
AttributeError: 'implicit.evaluation._memoryviewslice' object has no attribute 'dtype'
Environment Details:
- implicit: 0.7.2 (built from source)
- Python: 3.11.2
- CUDA: 12.3
- OS: Debian GNU/Linux 12
Attempted Solutions:
- I tried converting the model to CPU, but it didn't resolve the issue.
Question: How can I resolve this AttributeError when evaluating the model with the implicit library?
版权声明:本文标题:python - AttributeError: 'implicit.evaluation._memoryviewslice' object has no attribute 'dtype' 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736574633a1944827.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论