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 variables on non-first call
解决方法:
不要再call中调用tf.keras的接口,使其在模型定义的init()方法中定义。
如
`def __init__():
self.embed_seq = tf.keras.layers.Embedding(8874, input_length=self.playlength, output_dim=32)
def call():
y = embed_seq(x)
`
tf.function-decorated function tried to create variables on non-first call相关推荐
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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. 解决方案-当您尝试 ...
- 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中 ...
- function java_java.util.function之function
Function类包含四种方法,其中一个抽象方法apply(),两个default方法andThen()和compose(),以及一个静态方法identity(). 实例化Function的时候需要实 ...
- ( function(){…} )()和( function (){…} () )是两种立即执行函数
函数声明:function fnName () {-}; 函数表达式 var fnName = function () {-}; 匿名函数:function () {}; fnName(); func ...
- js立即执行函数: (function ( ){...})( ) 与 (function ( ){...}( ))
( function(){-} )() ( function (){-} () ) 是两种javascript立即执行函数的常见写法,最初我以为是一个括号包裹匿名函数,再在后面加个括号调用函数,最后达 ...
最新文章
- 为x86 CPU自动调度神经网络
- R语言optimize函数一维优化实战
- 互联网人才大迁徙:新基建人均月薪17895元,核心人才缺口420万
- String与NSString关系
- TypeScript 发布 3.4 首个 RC 预览版
- 核能力将定手机浏览器HTML5之争成败
- 分析一段H264视频数据
- 5 点击图换下一张_如何制作一张高点击率主图
- 面向对象软件设计原则(一) —— 引子
- 11.排序算法_1_快速排序
- php设计模式总结-单件模式
- idea 搜索快捷键
- 最好的UI/UE设计资源网站推荐-免费的头像库
- 简单爬虫 爬取百度图片并批量重命名
- 路演 - roadshow
- 卸载 Mac 默认的 Xcode 附带的 git
- 群晖NAS搭建WebDav服务,并内网穿透实现公网访问
- 【文献学习】热电偶信号调理、IOT接入
- mysql 查找具体sql执行性能
- scala之隐式转换