当前位置:网站首页>Error-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
2022-07-01 14:41:00 【Hula Hula hey】
ValueError: tf.function-decorated function tried to create variables on non-first call
stay tensorflow2 The following saved models always report errors , It's a headache :
model.save(weight_file)The wrong position is fixed in :
out_data = tf.keras.layers.Conv2D(filters, [3,3])(concat_data)Finally find out why , You need to be in __init__ Defined in the function body , Can be in call Call in the :
def __init__(self,**kwargs):
super(Up_sampling, self).__init__(**kwargs)
self.Conv2D_256 = tf.keras.layers.Conv2D(256, [3, 3])
def call(self, input,filters):
if filters==256:
out_data = self.Conv2D_256(input)This will solve the problem well , The error disappears !
边栏推荐
- 【R语言数据科学】:机器学习常见评估指标
- Research Report on the development trend and competitive strategy of the global powder filling machine industry
- [dynamic programming] interval dp:p1005 matrix retrieval
- sqlilabs less-8
- Semiconductor foundation of binary realization principle
- Admire, Ali female program undercover more than 500 black production groups
- 2022-2-15 learning xiangniuke project - Section 4 business management
- Details of appium key knowledge
- What problems should be considered for outdoor LED display?
- Provincial election + noi Part IX game theory
猜你喜欢

对于编程思想和能力有重大提升的书有哪些?

深度合作 | 涛思数据携手长虹佳华为中国区客户提供 TDengine 强大企业级产品与完善服务保障

sqlilabs less13

JVM performance tuning and practical basic theory part II

微服务大行其道的今天,Service Mesh是怎样一种存在?

Rearrangement of overloaded operators

Fundamentals of C language

So programmers make so much money doing private work? It's really delicious
![[repair version] imitating the template of I love watching movies website / template of ocean CMS film and television system](/img/fa/15b1cc3a8a723ff34eb457af9f701e.jpg)
[repair version] imitating the template of I love watching movies website / template of ocean CMS film and television system
![[R language data science]: common evaluation indicators of machine learning](/img/c8/dbfb041fa72799fae1892fe8ac0050.png)
[R language data science]: common evaluation indicators of machine learning
随机推荐
Provincial election + noi Part VIII fraction theory
期末琐碎知识点再整理
Use the right scene, get twice the result with half the effort! Full introduction to the window query function and usage scenarios of tdengine
JVM performance tuning and practical basic theory part II
Today, with the popularity of micro services, how does service mesh exist?
Realize queue with stack and stack with queue (C language \leetcode\u 232+225)
tensorflow2-savedmodel convert to pb(frozen_graph)
What problems should be considered for outdoor LED display?
Details of appium key knowledge
[R language data science]: common evaluation indicators of machine learning
【牛客网刷题系列 之 Verilog快速入门】~ 多功能数据处理器、求两个数的差值、使用generate…for语句简化代码、使用子模块实现三输入数的大小比较
JVM performance tuning and practical basic theory part II
互联网医院系统源码 医院小程序源码 智慧医院源码 在线问诊系统源码
Pat 1065 a+b and C (64bit) (20 points) (16 points)
Opencv interpolation mode
[stage life summary] I gave up the postgraduate entrance examination and participated in the work. I have successfully graduated and just received my graduation certificate yesterday
C 语言进阶
Admire, Ali female program undercover more than 500 black production groups
sqlilabs less10
qt捕获界面为图片或label显示