当前位置:网站首页>AttributeError: ‘tuple‘ object has no attribute ‘layer‘问题解决
AttributeError: ‘tuple‘ object has no attribute ‘layer‘问题解决
2022-07-02 23:31:00 【不撸先疯。】
一、问题描述
安装keras_bert、tensorflow、keras后,本来程序运行好好的,训练了两个模型也一切正常,随后由于Bert英文分词时,keras_bert不满足要求,尝试了transformers和bert4keras中的tokenizer后,突然报错,模型生成有问题。

查阅多方资料显示版本不兼容,tensorflow2.0以上会出现和keras版本问题。
二、问题解决
测试通过版本1:
python == 3.6
tensorflow-gpu == 2.2.0
keras == 2.4.3
keras_bert == 0.89.0
版本2:
python 2.7 + tensorflow 1.13 + keras 2.2.4
三、问题解决
版本匹配很重要!!!
至此,问题解决!
边栏推荐
- 有哪些比较推荐的论文翻译软件?
- AcWing_188. 武士风度的牛_bfs
- 可下载《2022年中国数字化办公市场研究报告》详解1768亿元市场
- University of Toronto:Anthony Coache | 深度强化学习的条件可诱导动态风险度量
- 免费自媒体必备工具分享
- [golang syntax] map common errors golang panic: assignment to entry in nil map
- CMake基本使用
- Andorid gets the system title bar height
- 程序分析与优化 - 9 附录 XLA的缓冲区指派
- Which websites can I search for references when writing a thesis?
猜你喜欢

logback配置文件

Xcode real machine debugging

哪些软件可以整篇翻译英文论文?

sysdig分析容器系统调用

Introduction of UART, RS232, RS485, I2C and SPI

CMake基本使用

Automated defect analysis in electron microscopic images-论文阅读笔记

Basic use of shell script

130 pages of PPT from the brick boss introduces the new features of Apache spark 3.2 & 3.3 in depth
![[IELTS reading] Wang Xiwei reading P1 (reading judgment question)](/img/ee/540661fcb2cf1cf1eb15e2026c997a.png)
[IELTS reading] Wang Xiwei reading P1 (reading judgment question)
随机推荐
NC24840 [USACO 2009 Mar S]Look Up
多进程编程(四):共享内存
Where can I find foreign papers?
写论文可以去哪些网站搜索参考文献?
有哪些比较推荐的论文翻译软件?
NC50965 Largest Rectangle in a Histogram
pod生命周期详解
Markdown使用教程
[target detection] r-cnn, fast r-cnn, fast r-cnn learning
Implement the foreach method of array
Andorid gets the system title bar height
AcWing_ 188. Warrior cattle_ bfs
[reading notes] phased summary of writing reading notes
Should you study kubernetes?
程序分析与优化 - 9 附录 XLA的缓冲区指派
Where can I find the English literature of the thesis (except HowNet)?
Leetcode skimming - game 280
CMake基本使用
Redis21 classic interview questions, extreme pull interviewer
Multiprocess programming (V): semaphores
至此,问题解决!