当前位置:网站首页>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
三、问题解决
版本匹配很重要!!!
至此,问题解决!
边栏推荐
- 论文的设计方案咋写?
- Wechat applet obtains the information of an element (height, width, etc.) and converts PX to rpx.
- JSON转换工具类
- [IELTS reading] Wang Xiwei reading P2 (reading fill in the blank)
- Pytorch 20 realizes corrosion expansion based on pytorch
- [reading notes] phased summary of writing reading notes
- DotNet圈里一个优秀的ORM——FreeSql
- 【雅思阅读】王希伟阅读P1(阅读判断题)
- Basic use of shell script
- pod生命周期详解
猜你喜欢
Architecture: database architecture design
奥斯陆大学:Li Meng | 基于Swin-Transformer的深度强化学习
[shutter] Introduction to the official example of shutter Gallery (learning example | email application | retail application | wealth management application | travel application | news application | a
Chapter 3 of getting started with MySQL: database creation and operation
Feature Engineering: summary of common feature transformation methods
Luogu_ P2010 [noip2016 popularization group] reply date_ Half enumeration
Automated defect analysis in electron microscopic images-论文阅读笔记
MySQL advanced learning notes (III)
Multiprocess programming (I): basic concepts
FAQ | FAQ for building applications for large screen devices
随机推荐
Architecture: database architecture design
Redis21 classic interview questions, extreme pull interviewer
CMake基本使用
MySQL 23 classic interview hanging interviewer
国外的论文在那找?
NC20806 区区区间间间
logback配置文件
Pat 1030 travel plan (30 points) (unfinished)
Nc50528 sliding window
NC24325 [USACO 2012 Mar S]Flowerpot
为什么网站打开速度慢?
Custom throttling function six steps to deal with complex requirements
What website can you find English literature on?
Don't want teachers to see themselves with cameras in online classes? Virtual camera you deserve!
【雅思阅读】王希伟阅读P1(阅读判断题)
可下载《2022年中国数字化办公市场研究报告》详解1768亿元市场
Question e: merged fruit -noip2004tgt2
Feature Engineering: summary of common feature transformation methods
Automated defect analysis in electronic microscopic images
Implement the foreach method of array