Keras.backend.local_conv1d 纪要
作者:
HITMiner | 来源:发表于
2018-11-08 15:30 被阅读61次
K.local_conv1d
- 关键输入
- inputs: 3D tensor with shape:
(batch_size, steps, input_dim)
- kernel: the unshared weight for convolution,
with shape (output_length, feature_dim, filters)
- kernel_size: a
tuple
of a single integer
,
specifying the length of the 1D convolution window
- strides: a
tuple
of a single integer
,
specifying the stride length of the convolution
- 注意点
-
steps
表示kernel要在该维度上移动
-
steps
维度的大小应该等于 (output_length-1)*stride + kernel_size
-
feature_dim
应该是被 batch_size * kernel_size * input_dim 整除
K.local_conv2d
- 输入
- inputs: 4D tensor with shape:
(batch_size, filters, new_rows, new_cols)
if data_format='channels_first'
or 4D tensor with shape:
(batch_size, new_rows, new_cols, filters)
if data_format='channels_last'.
- kernel: the unshared weight for convolution,
with shape (output_items, feature_dim, filters)
- kernel_size: a
tuple of 2 integers
, specifying the
width and height of the 2D convolution window.
- strides: a
tuple of 2 integers
, specifying the strides
of the convolution along the width and height.
- output_shape: a tuple with
(output_row, output_col)
- data_format: the data format,
channels_first
or channels_last
- output_row, output_col的要求和local_conv1d中output_length的要求类似
- kernel 中的 feature_dim 应该可以被 batch_size * filters * kernel_size[0] * kernel_size[1] 整除
- kernel中的output_items = output_shape[0] * output_shape[1]
- kernel中的feature_dim的含义是什么?难道要等于 kernel_size[0]*kernel_size[0]
- inputs中的 filters 指输入filter
- kernel中的filters 指输出filter, 输入中的filter和输出中的filter 不必相等
-
要想输出的batch_size 等于 输入的batch_size, kernel中的feature_dim应该等等于kernel_size[0] * kernel_size[1] * 输入中的filters
- 返回
A 4d tensor with shape:
(batch_size, filters, new_rows, new_cols)
if data_format='channels_first'
or 4D tensor with shape:
`(batch_size, new_rows, new_cols, filters)
if data_format='channels_last'.
本文标题:Keras.backend.local_conv1d 纪要
本文链接:https://www.haomeiwen.com/subject/xdaixqtx.html
网友评论