转自:https://blog.csdn.net/qq_26552071/article/details/81178932
二维卷积conv2d
给定4维的输入张量和滤波器张量来进行2维的卷积计算。即:图像进行2维卷积计算
一维卷积conv1d
value = array_ops.expand_dims(value, spatial_start_dim) # 输入张量 filters = array_ops.expand_dims(filters, 0) # 滤波器 result = gen_nn_ops.conv2d( value, filters, strides, padding, use_cudnn_on_gpu=use_cudnn_on_gpu, data_format=data_format) return array_ops.squeeze(result, [spatial_start_dim])
给定三维的输入张量和滤波器来进行1维卷积计算。即:语音等三维数据进行1维卷积计算