报错:AttributeError: module 'tensorflow.python.framework.ops' has no attribute '_TensorLike'

问题:是tensorflow.keras和keras之间的兼容性问题

解决方案:

统一改为

import tensorflow.keras

或者

import keras

通过更改tensorflow的版本也可能解决

tensorflow.keras和keras存在一定的差异

例如:在训练的时候查看history

keras:  loss, accuracy, val_loss, val_accuracy

tensorflow.keras  loss, acc, val_loss, val_acc

has no attribute _TensorLike相关推荐

  1. keras_contrib使用问题

    1.keras_contrib安装 https://github.com/keras-team/keras-contrib 下载后将keras_contrib文件夹放到python的\Lib\site ...

  2. Python错误:AttributeError: 'generator' object has no attribute 'next'解决办法

    今天在学习生成器对象(generation object)运行以下代码时,遇到了一个错误: #定义生成器函数 def liebiao(): for x in range(10): yield x #函 ...

  3. Error:warning: Ignoring InnerClasses attribute for an anonymous inner class

    最近安装项目到自己oppo手机上提示Error:warning: Ignoring InnerClasses attribute for an anonymous inner class,但是在模拟机 ...

  4. error: Error: No resource found for attribute ‘layout_scrollFlags’ in package‘包名’

    遇到error: Error: No resource found for attribute 'layout_scrollFlags' in package'包名' 这个问题时候刚开始自己也是感觉到 ...

  5. AttributeError: 'dict' object has no attribute 'status_code'

    前端AJAX请求数据,提示错误:"AttributeError: 'dict' object has no attribute 'status_code'". 原因:是提示返回对象 ...

  6. C# Attribute简介

    一 .EventAttribute有: BrowsableAttribute .CategoryAttribute.DescriptionAttribute.DefaultEventAttribute ...

  7. C# 特性(Attribute)学习。

    特性(attribute)是被指定给某一声明的一则附加的声明性信息. 在C#中,有一个小的预定义特性集合.在学习如何建立我们自己的定制特性(custom attributes)之前,我们先来看看在我们 ...

  8. Attribute在.net编程中的应用

    作者:niwalker       出处:csdn SqlCommandGenerator类的设计 SqlCommandGEnerator类的设计思路就是通过反射得到方法的参数,使用被SqlComma ...

  9. Attribute 绑定、类绑定和样式绑定

    Attribute 绑定.类绑定和样式绑定 1. 绑定到 Attribute 优先设置带有 Property 绑定的元素的 Property.如果没有可绑定的元素 Property,可以使用 Attr ...

最新文章

  1. 关于Java中final关键字的详细介绍
  2. request.getRealPath不推荐使用
  3. eclipse手动安装alibaba代码规范插件
  4. YBTOJ洛谷P3292:幸运数字(线性基、点分治/倍增)
  5. 二分+树的直径 [Sdoi2011]消防
  6. 有两个链表a,b,设结点包括学号,姓名。从a链表中删去与b链表中有相同学号的那些结点。
  7. 【Html】Html基本标记
  8. Centos 7 安装shellcheck
  9. #033 信安培训基础题Python解决网络安全实验室|网络信息安全攻防学习平台
  10. [转] boost undefined reference to 'pthread_create 问题
  11. 日志打印工具类LogUtils
  12. 《嵌入式 – GD32开发实战指南》第10章 串口通信
  13. 手机常见分辨率及代表机型
  14. [音频处理]傅里叶变换去噪
  15. 基于ROS的机器人模型建立及3D仿真【物理/机械意义】
  16. 飞龙在天:docker安装青龙大全
  17. linux内核源码系统调用有多少个,Linux内核源码目录介绍
  18. 如何用windows系统自带的截图工具截图
  19. Linux下识别NTFS格式的U盘
  20. 是什么门的缩写_开车:和她结婚需要注意什么

热门文章

  1. 企业流程篇--项目管理(七)
  2. 中国经济形势开年如何看?
  3. ar ebs 销售订单关闭_本周大新闻|《哈利波特》AR游戏玩法公开,谷歌关闭VR影视部门...
  4. PCB工程师级别评定标准
  5. git操作与vscode,码市的结合
  6. qt creator编译qt工程时报错:undefined reference to
  7. 传智播客软件测试学习视频汇总:
  8. MODIS数据之HEG拼接重采样批处理(Python_MacOS)
  9. 帝国Empire采集-帝国如何免费采集
  10. STM-1和SDH是什么关系?SONET与SDH是什么关系?