K.local_conv1d
- 關(guān)鍵輸入
- 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 asingle integer
,
specifying the length of the 1D convolution window - strides: a
tuple
of asingle integer
,
specifying the stride length of the convolution
- inputs: 3D tensor with shape:
- 注意點(diǎn)
-
steps
表示kernel要在該維度上移動(dòng) -
steps
維度的大小應(yīng)該等于 (output_length-1)*stride + kernel_size -
feature_dim
應(yīng)該是被 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
orchannels_last
- inputs: 4D tensor with shape:
- output_row, output_col的要求和local_conv1d中output_length的要求類(lèi)似
- kernel 中的 feature_dim 應(yīng)該可以被 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應(yīng)該等等于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'.