• 首页
  • 前端技术
  • 编程语言
  • 人工智能
  • 运维知识
  • 资源下载
  • 常用小工具
  • 技术问答

model=word2vec.Word2Vec(sentences, size=50) TypeError: __init__() got an unexpected keyword argument 'size'

2022-12-23

官网地址:https://radimrehurek.com/gensim/models/word2vec.html#gensim.models.word2vec.Text8Corpus

原因就是在新版的Word2vec里边一些具体的参数进行了更新,所以显示参数错误

解决方案

size -> vector_size

AttributeError: 'Word2Vec' object has no attribute 'most_similar'

model.most_similar -> model.wv.most_similar

model.n_similarity -> model.wv.similarity

相关文章:

猜你喜欢
相关资源
相似解决方案
热门标签
Java Python linux javascript Mysql C# Docker 算法 前端 SpringBoot Redis Vue spring 设计模式 .net core .net kubernetes c++ 数据库 数据结构 大数据 js 机器学习 微服务 Android Go 程序员 面试 JVM ASP.net core 云原生 人工智能 后端 PHP git CSS golang k8s Nginx Django mybatis 深度学习 多线程 React 架构 devops 爬虫 云计算 Spring Boot LeetCode
By © 2026 likecs 版权所有,
本站所有数据收集于网络如有侵犯到您的权益请联系 进行下架处理1。
粤ICP备22038628号Powered By WordPress