当前位置:网站首页>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
三、问题解决
版本匹配很重要!!!
至此,问题解决!
边栏推荐
- NC24325 [USACO 2012 Mar S]Flowerpot
- JVM foundation review
- 数组常用操作方法整理(包含es6)及详细使用
- NC24840 [USACO 2009 Mar S]Look Up
- Luogu_ P1149 [noip2008 improvement group] matchstick equation_ Enumeration and tabulation
- About the practice topic of screen related to unity screen, unity moves around a certain point inside
- Which software can translate an English paper in its entirety?
- Multi process programming (III): message queue
- Form form instantiation
- Nc20806 District interval
猜你喜欢

How do educators find foreign language references?

TypeError: Cannot read properties of undefined (reading ***)

Why is the website slow to open?

Architecture: database architecture design

pod生命周期详解

论文的英文文献在哪找(除了知网)?

Bigder: how to deal with the bugs found in the 32/100 test if they are not bugs

Maya fishing house modeling

Bloom filter

Multiprocess programming (II): Pipeline
随机推荐
免费自媒体必备工具分享
Mutual exclusion and synchronization of threads
Monitor container runtime tool Falco
【Pulsar文档】概念和架构/Concepts and Architecture
Missing number
写论文可以去哪些网站搜索参考文献?
Install docker and use docker to install MySQL
FRP reverse proxy +msf get shell
Multiprocess programming (V): semaphores
Markdown使用教程
MySQL advanced learning notes (III)
node_modules删不掉
mm中的GAN模型架构
SQL query statement parameters are written successfully
MySQL 23道经典面试吊打面试官
zhvoice
Custom throttling function six steps to deal with complex requirements
Bigder: how to deal with the bugs found in the 32/100 test if they are not bugs
Why is the website slow to open?
FAQ | FAQ for building applications for large screen devices
至此,问题解决!