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

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. 理解MVC—从实例出发:基于MVC模式的简易算术计算器
  2. 数字断路器获得商用认证
  3. bzoj1791: [Ioi2008]Island 岛屿 单调队列优化dp
  4. 产品经理的高阶能力:商业思维基于商业画布的研习方法论
  5. js 格式化 java时间格式化_javascript时间格式化
  6. 使用分发列表过滤BGP路由
  7. 【在路上2】快递的运单轨迹
  8. vue使用python_如何使用Python和Vue创建两人游戏
  9. Android打开谷歌应用,谷歌确认 Android 12 新增剪贴板访问提醒,将在 Beta 2 上线
  10. ip 十进制 整型 java_IP地址转换成10进制整数(zt)
  11. python判断某一天是周几
  12. 支付宝SDK ios快捷支付
  13. 迈腾车能进2.10米宽的车库吗?
  14. matlab中input输入多个数_python怎么一次输入两个数
  15. c语言创建增加删除单向动态链表,C语言实现简单的单向链表(创建、插入、删除)及等效STL实现代码...
  16. 只保留日期_第五人格五个特定活动道具十分少见 最后一个一年只出现一次
  17. AAAI2020-一种生成对抗网络的蒸馏方法(Distilling portable Generative Adversarial Networks for Image Translation)
  18. Spring实战——UrlResource
  19. matlab怎么算不定积分,matlab计算不定积分
  20. iOS 之强大的WebSocket

热门文章

  1. Gatepay.io 独立开发者个人即时到账零费率收款平台 接入步骤
  2. GCP 谷歌云平台申请教程
  3. 分布式共识算法(拜占庭容错算法)的系列整理一:PBFT、PoW、PoS、DPos
  4. 函数指针做函数参数 使用总结及其意义
  5. 中国在高科技产业上的崛起让韩国如芒在背
  6. rtorrent一键安装脚本rtinst指定版本号
  7. 明胶纳米颗粒GNPs,50-100nm,呈光滑球形,颗粒尺寸分布较为均匀/齐岳生物
  8. linux oracle配置远程连接
  9. 最简单的OpenSL播放PCM实时音频
  10. python多项式运算字典_使用字典在Python中乘法多项式