在进行训练过程前,加上以下代码即可:

tf.config.experimental_run_functions_eagerly(True)

原因可参考该博文内容,和以下链接:
https://blog.csdn.net/weixin_43824178/article/details/99297237

https://www.tensorflow.org/guide/effective_tf2#use_tfconfigexperimental_run_functions_eagerly_when_debugging

ValueError: tf.function-decorated function tried to create variables on non-first call的解决方式相关推荐

  1. Bug之ValueError: tf.function-decorated function tried to create variables on non-first call.

    问题描述: tensorflow2.1 搭建模型时报以下错误 ValueError: tf.function-decorated function tried to create variables ...

  2. ValueError: tf.function-decorated function tried to create variables on non-first call

    问题: tf 1x 的代码迁移到 tf 2x时出现错误: ValueError: tf.function-decorated function tried to create variables on ...

  3. ValueError: tf.function-decorated function tried to create variables on non-first call.

    问题:ValueError: tf.function-decorated function tried to create variables on non-first call. 解决方案-当您尝试 ...

  4. ValueError: Creating variables on a non-first call to a function decorated with tf.function.解决方法

    参考Creating variables on a non-first call to a function decorated with tf.function.解决方法!_时时勤拂拭.的博客-CS ...

  5. Creating variables on a non-first call to a function decorated with tf.function.解决方法!

    Creating variables on a non-first call to a function decorated with tf.function.解决方法! Creating varia ...

  6. tf.function-decorated function tried to create variables on non-first call

    tf2.0在模型的call()中调用tf.keras.layers.embedding,出错 tf.function-decorated function tried to create variab ...

  7. Error-tf.function-decorated function tried to create variables on non-first call

    ValueError: tf.function-decorated function tried to create variables on non-first call 在tensorflow2中 ...

  8. function java_java.util.function之function

    Function类包含四种方法,其中一个抽象方法apply(),两个default方法andThen()和compose(),以及一个静态方法identity(). 实例化Function的时候需要实 ...

  9. ( function(){…} )()和( function (){…} () )是两种立即执行函数

    函数声明:function fnName () {-}; 函数表达式 var fnName = function () {-}; 匿名函数:function () {}; fnName(); func ...

  10. js立即执行函数: (function ( ){...})( ) 与 (function ( ){...}( ))

    ( function(){-} )() ( function (){-} () ) 是两种javascript立即执行函数的常见写法,最初我以为是一个括号包裹匿名函数,再在后面加个括号调用函数,最后达 ...

最新文章

  1. 近期活动盘点:工业大数据讲座、大数据自杀风险感知讲座、数据法学研讨会、海外学者短期讲学(12.3-12.13)
  2. 记一次 解决 vue 兼容ie11 的问题
  3. QT的QMessageBox类的使用
  4. 04_NoSQL数据库之Redis数据库:set类型和zset类型
  5. c语言程序设计字节,C语言程序设计-数据类型
  6. 6.过滤器(Filter)
  7. python语言网课答案_Python语言答案
  8. IdentityServer4之Client Credentials(客户端凭据许可)
  9. android 8字体下载,安卓手机字体
  10. 图解大数据技术:从入门到精通系列教程
  11. Java Excel 列号数字与字母互相转换
  12. Windows开启ftp服务-使用Xlight FTP Server
  13. [20190227]Windows系统评估工具winsat.txt
  14. java货郎担问题求解_货郎担问题的四种实现方法
  15. 人为什么要学数学 ——数学意义的哲学思考
  16. ldd 执行结果:不是动态可执行文件
  17. java组件及事件处理(11)--ActionListener一个窗口,两个事件
  18. linux的账号锁定
  19. No module named '_bz2'
  20. Minimum Number of Refueling Stops(C++最低加油次数)

热门文章

  1. 2019华为-CodeCraft经历
  2. 软件测试的生命周期、Bug
  3. java 类似 黑针探针_java探针技术I——如何写一个 java agent
  4. c++制作简易中国象棋
  5. SVN 解决冲突问题
  6. echarts饼图属性
  7. 外贸英语:物流行业术语
  8. 【郭东白架构课 开篇词】开篇词|没有战略意图,就成不了一个顶尖的架构师
  9. 更改repo的python版本
  10. 手机/平板电脑作为pc电脑扩展屏——Splashtop Wired XDisplay使用教程