TensorflowConv2D:AttributeError: ‘int‘ object has no attribute ‘lower‘

简介: TensorflowConv2D:AttributeError: ‘int‘ object has no attribute ‘lower‘

AttributeError: 'int' object has no attribute 'lower'

出现问题原因:

self.conv1 = Conv2D(filters=6,
                            kernel_size=5,
                            padding='same')

当使用Conv2d层搭建网络,需要使用padding进行填充,但是Tensorflow的padding参数值只有两种可选方式,分别是samevalid,前者是保持输入和输出图像尺寸不变,它会自动计算应该填充多少,默认是valid会造成图像尺寸减小,pytorch支持使用数字进行填充。


目录
相关文章
|
2月前
|
计算机视觉 Python
解决 NoneType‘ object has no attribute ‘astype’ 问题
解决 NoneType‘ object has no attribute ‘astype’ 问题
50 0
|
12天前
|
Python
【已解决】AttributeError: ‘Index‘ object has no attribute ‘to_list‘
【已解决】AttributeError: ‘Index‘ object has no attribute ‘to_list‘
6 0
|
2月前
|
机器学习/深度学习 监控 数据可视化
【已解决】 ‘Conv2d’ object has no attribute ‘register_full_backward_hook’
【已解决】 ‘Conv2d’ object has no attribute ‘register_full_backward_hook’
|
2月前
|
安全 计算机视觉 Python
【已解决】attributeerror: ‘FreeTypeFont‘ object has no attribute ‘getsize‘
【已解决】attributeerror: ‘FreeTypeFont‘ object has no attribute ‘getsize‘
|
2月前
|
API Android开发
android setTag (int key, Object tag)使用
android setTag (int key, Object tag)使用
16 1
|
2月前
AttributeError: 'NoneType' object has no attribute 'to_capabilities'
AttributeError: 'NoneType' object has no attribute 'to_capabilities'
412 0
|
2月前
|
Python
AttributeError: module ‘numpy‘ has no attribute ‘int‘.
AttributeError: module ‘numpy‘ has no attribute ‘int‘.
24 0
|
2月前
|
Python
AttributeError: module ‘numpy‘ has no attribute ‘int‘.
AttributeError: module ‘numpy‘ has no attribute ‘int‘.
30 0
|
2月前
AttributeError ‘NoneType‘ object has no attribute ‘to_capabilities‘
AttributeError ‘NoneType‘ object has no attribute ‘to_capabilities‘
154 0
|
2月前
|
数据采集
运行爬虫时报错AttributeError—— 'str' object has no attribute 'capabilities'
运行爬虫时报错AttributeError—— 'str' object has no attribute 'capabilities'
416 0