当前位置:网站首页>Keras to tf Vgg19 input in keras_ shape
Keras to tf Vgg19 input in keras_ shape
2022-06-29 09:14:00 【Duanmucheng】
Use tf.keras An error was reported . from keras Change to tf It appears that
Conclusion :shape Too big , The input requirements are not met
to update :nice! Try it later This
Traceback (most recent call last):
File "srgan.py", line 406, in <module>
gan = SRGAN()
File "srgan.py", line 63, in __init__
self.vgg = self.build_vgg()
File "srgan.py", line 150, in build_vgg
img_features = vgg(img)
File "C:\python3_7\lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 922, in __call__
outputs = call_fn(cast_inputs, *args, **kwargs)
File "C:\python3_7\lib\site-packages\tensorflow\python\keras\engine\network.py", line 719, in call
convert_kwargs_to_constants=base_layer_utils.call_context().saving)
File "C:\python3_7\lib\site-packages\tensorflow\python\keras\engine\network.py", line 888, in _run_internal_graph
output_tensors = layer(computed_tensors, **kwargs)
File "C:\python3_7\lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 886, in __call__
self.name)
File "C:\python3_7\lib\site-packages\tensorflow\python\keras\engine\input_spec.py", line 216, in assert_input_compatibility
' but received input with shape ' + str(shape))
ValueError: Input 0 of layer fc1 is incompatible with the layer: expected axis -1 of input shape to have value 25088 but received input with shape [None, 32768]
Checked img Of shape( relevant blog), Two references shape Agreement .
Check both applications api Is there a difference :
tensorflow Inside input_shape[224.224.3]
keras Inside input_shape:299*299
Code testing img Of shape by 256,256,3
warning It also shows
WARNING:tensorflow:Model was constructed with shape (None, 224, 224, 3) for input Tensor("input_1:0", shape=(None, 224, 224, 3), dtype=float32), but it was called on an input with incompatible shape (None, 256, 256, 3).
Change a little shape
- New mistakes , Lower tensorflow Version is 1 Does not appear after
X_test.shape:(None, 224, 224, 3)
X_test[num].shape:(224, 224, 3)
Traceback (most recent call last):
File "srgan.py", line 404, in <module>
gan = SRGAN()
File "srgan.py", line 63, in __init__
self.vgg = self.build_vgg()
File "srgan.py", line 148, in build_vgg
img_features = vgg(img)
File "C:\python3_7\lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 922, in __call__
outputs = call_fn(cast_inputs, *args, **kwargs)
File "C:\python3_7\lib\site-packages\tensorflow\python\keras\engine\network.py", line 719, in call
convert_kwargs_to_constants=base_layer_utils.call_context().saving)
File "C:\python3_7\lib\site-packages\tensorflow\python\keras\engine\network.py", line 900, in _run_internal_graph
tensor = tensor_dict[str(id(x))].pop()
IndexError: pop from empty list
- I can't get around it , use gpu Training has this problem (?)
Add link description
边栏推荐
- 记微信小程序分享代码片段
- CDGA|交通行业做好数字化转型的核心是什么?
- AugFPN:改进多尺度特征学习用于目标检测
- Working for many years, recalling life -- three years in high school
- Official reply on issues related to the change of children's names after parents' divorce
- 一般乘法器设计,verilog code
- 训练查看(问题暂存)
- verilog 归约操作符
- mysql insert 时出现Deadlock死锁场景分析
- 微信小程序搜索关键字高亮和ctrl+f搜索定位实现
猜你喜欢

Open3D 最远点采样(FPS)

laravel 8 实现 订单表按月份水平分表

2022年7月系统集成项目管理工程师认证招生简章

train_on_batch保存一下loss函数变化的图像

MySQL uses union all to count the total number of combinations of multiple tables and the number of tables respectively

AugFPN:改進多尺度特征學習用於目標檢測

微信小程序最新canvas2d手写签名

uniapp引入组件不生效解决方法

AugFPN:改进多尺度特征学习用于目标检测

51 MCU interrupt and timer counter, based on Puzhong technology hc6800-esv2.0
随机推荐
LFFD:一种用于边缘检测的轻量化快速人脸检测器
Verilog data type
Summary of IO streams
Open3D 隐藏点移除
npm常用命令
单例模式的理解
Verilog 大小端以及 +:使用
Does the SQL server run with administrator privileges? Or run it as a normal user?
记微信小程序分享代码片段
使用GPU训练kernel切换
YOLO Nano:一种高度紧凑的只看一次的卷积神经网络用于目标检测
ThinkPHP 6 使用 mongoDB
PAT (Basic Level) Practice (中文)1003 我要通过! (20分) C语言实现
First electric shock, so you are such a dragon lizard community | dragon lizard developer said that issue 8
MySQL virtual column
编程语言
两阶段目标检测原理详细版
(转)MySQL: ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes
Verilog 数据类型
微信小程序分享页面,分享到朋友圈