【Word2vec报错TypeError: __init__() got an unexpected keyword argument ‘iter/size‘】

@[TOC](Word2vec报错TypeError: init() got an unexpected keyword argument ‘iter/size’)

最近在用gensim做word2vec训练词向量,看了很多教程,自己跑代码却报错,查了一下才发现是因为gensim版本不同,所以参数的名字有些不太一样。
只要把size改成vector_size,iter改成epochs就可以了
这是报错
修改之后就好啦
参考了这两篇博文
https://blog.csdn.net/Wuli_jiejie/article/details/118712379?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522164499775416781685381968%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=164499775416781685381968&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allfirst_rank_ecpm_v1~rank_v31_ecpm-5-118712379.pc_search_result_control_group&utm_term=TypeError%3A+init%28%29+got+an+unexpected+keyword+argument+iter&spm=1018.2226.3001.4187
https://blog.csdn.net/fu_jian_ping/article/details/121879941?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522164499699916781685321619%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=164499699916781685321619&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allfirst_rank_ecpm_v1~rank_v31_ecpm-4-121879941.pc_search_result_control_group&utm_term=TypeError%3A+init%28%29+got+an+unexpected+keyword+argument+size&spm=1018.2226.3001.4187

你可能感兴趣的:(word2vec,机器学习,人工智能)