TypeError: TF_SessionRun_wrapper: expected all values in input dict to be ndarray.
2024-10-08 18:09:33
在用Embedding时出现了这个问题,具体的代码:
model.add(Embedding(input_dim = vocab_size, output_dim = embedding_vector_size, input_length = max_len, weights = [embedding_matrix]))
本来以为是参数类型的问题,但怎么也找不出来,最后看github发现了解决方法:重装numpy(我也不知道为什么—.—)
记住在重装numpy的时候要关掉你的IDE或jupyter notebook,不然会出现类似:
PermissionError: [WinError 5] 拒绝访问。的警告,可能导致删不干净。
然后重装numpy即可
pip uninstall numpy
pip install numpy
最新文章
- “You couldn’t see my tears cause I am in the water.“ Fish said to water.“But I could feel your tears cause you are in my heart..“ Answered water.
- BZOJ 3594 方伯伯的玉米田
- 第 27 章 CSS 传统布局[下]
- 记一次使用openrowset 的坑
- UML(一):类、接口、抽象类
- ASM文件系统
- github 向导/介绍
- java转义字符探究恢复
- Swift中的HTTP请求
- python学习笔记10(函数一): 函数使用、调用、返回值
- devexpress chartcontrol实现非连续点数据的显示
- Vue 爬坑之路(七)—— 监听滚动事件 实现动态锚点
- openldap 编译报错MozNSS not found
- C++对象模型(二):The Semantics of Copy Constructors(拷贝构造函数之编译背后的行为)
- The 6th tip of DB Query Analyzer
- js常用通用方法
- [swarthmore cs75] Compiler 6 – Garbage Snake
- Excel如何实现两个工作表数据的对比
- SPSS-聚类分析
- jQuery与js对象互转
热门文章
- 配置thinkphp对mysql线上线下切换不同环境的配置 - (mysql-thinkphp) (1)
- 获取url特定字后面的参数
- SQL注入汇总(手注,盲注,报错注入,宽字节,二次编码,http头部){10.22、23 第二十四 二十五天}
- JVM探秘:JVM的参数类型
- JavaWeb开发校园二手平台项目 源码
- ntpdate更新系统时间时报错Can't find host ntp1.aliyun.com: Servname not supported for ai_socktype (-8)
- 使用Oracle VM VirtualBox安装CentOS 7.6操作系统
- POJ 2031:Building a Space Station 最小生成树
- windows driver 获取本地时间
- 从零开始Windows环境下安装python+tensorflow