当前位置:网站首页>22.6.7 successfully use doc2vec model to generate embedded vectors
22.6.7 successfully use doc2vec model to generate embedded vectors
2022-06-10 14:09:00 【dream_ uping】
1. Changed a place to solve the problem of not being able to use

2. Code
from gensim.test.utils import get_tmpfile
from gensim.models.doc2vec import Doc2Vec,TaggedDocument
from gensim.models import Doc2Vec
# import sys # Import sys modular
# sys.setrecursionlimit(3000) # Change the default recursion depth to 3000
# fname = get_tmpfile('F:\\test\my_test\doc2vec Generate vector file \\all_model_titles')
# model = Doc2Vec.load(fname)
model = Doc2Vec.load('F:\\test\my_test\doc2vec Generate vector file \\all_model_titles')
vector = model.infer_vector(["hello world!","responce"])
print(vector)result :

It depends on gensim by 3.8.3.

边栏推荐
- [FAQ] résumé des problèmes courants et des solutions lors de l'utilisation de l'interface API rest du Service de santé sportive
- [discrete mathematics review series] VI. tree
- Resolve the error reported when installing gerapy: error: cannot uninstall 'certificate' It is a distutils installed project...
- 1
- What can the graph of training and verification indicators tell us in machine learning?
- C # list of shallow copy and deep copy customized classes <>
- Microsoft Word 教程,如何在 Word 中更改页边距、创建新闻稿栏?
- 【离散数学期复习系列】四、图
- Anaconda installs opencv (CV2) and uses it in the jupyter notebook
- C multithreading learning note 3
猜你喜欢

大厂必备的40个方法论

C multithreading learning note 2

Implementation of VGA protocol based on FPGA

【重庆大学】初试复试资料分享(附考研群)

Mutual transformation among lists, arrays and tensors

列表、数组和张量之间的相互转化
![[discrete mathematics review series] IV. figure](/img/70/5b2f783265e7e5f6485b49088400da.png)
[discrete mathematics review series] IV. figure

Review summary of final examination of software architecture principles, methods and practices, Second Edition
![[operation tutorial] how to correctly use the Hikvision demo tool to configure the channel to go online?](/img/2f/b4d18ac1f030f7678e6f0b59c61291.png)
[operation tutorial] how to correctly use the Hikvision demo tool to configure the channel to go online?

How to build Haojing technology when the computing power network is brought into reality?
随机推荐
Resolve the error reported when installing gerapy: error: cannot uninstall 'certificate' It is a distutils installed project...
多云管理平台cmp是什么意思?谁能清楚解释一下
SIGIR 2022 | 港大、武大提出KGCL:基于知识图谱对比学习的推荐系统
五角大楼首次承认资助46个乌生物设施 俄方曾曝只有3个安全
[note] about the problem of insufficient compilation mapping memory in keil
【离散数学期复习系列】四、图
Anaconda installs opencv (CV2) and uses it in the jupyter notebook
Allan方差与随机误差辨识
2022 high frequency software test interview questions of large factories (with answers)
2022 practice questions and online simulation test for the third batch of Guangdong Provincial Safety Officer a certificate (principal)
How to solve the problem that vmware tools are grayed out when VMware Workstation is installed
About native SQL and database methods in PHP framework
How to locate the hot problem of the game
Analysis on the use of coordinatorlayout
How to write a global notice component?
数仓的基本概念
北京/上海内推 | 微软亚洲研究院系统与网络组招聘全职实习生
CVPR 2022 | 基于序列对比学习的长视频逐帧动作表示
Review summary of final examination of software architecture principles, methods and practices, Second Edition
Is it safe to open an account in qiniu