??tf.nn.separable_conv2d
來自專欄 TensorFlow
Args:
input
: 4-DTensor
with shape[batch, in_height, in_width, in_channels]
.depthwise_filter
: 4-DTensor
with shape[filter_height, filter_width, in_channels, channel_multiplier]
. Containsin_channels
convolutional filters of depth 1.pointwise_filter
: 4-DTensor
with shape[1, 1, channel_multiplier * in_channels, out_channels]
. Pointwise filter to mix channels afterdepthwise_filter
has convolved spatially.strides
: 1-D of size 4. The strides for the depthwise convolution for each dimension ofinput
.padding
: A string, eitherVALID
orSAME
. The padding algorithm.name
: A name for this operation (optional).
import tensorflow as tftest API: tf.nn.separable_conv2da = tf.Variable(tf.truncated_normal([3, 3, 3, 2]))b = tf.Variable(tf.truncated_normal([1, 1, 6, 8]))input = tf.placeholder(tf.float32, shape = [2, 5, 5, 3])output = tf.nn.separable_conv2d(input, #4-D Tensor with shape according to data_format a, #4-D Tensor with shape [filter_height, filter_width, in_channels, channel_multiplier]. Contains in_channels convolutional filters of depth 1 b, #4-D Tensor with shape [1, 1, channel_multiplier * in_channels, out_channels]. Pointwise filter to mix channels after depthwise_filter has convolved spatially strides = [1,1,1,1], padding = SAME)print(output.get_shape().as_list())
推薦閱讀:
※王俊凱出席NYCC宣傳電影《長城》變身暖男 街頭秀百變造型
※王俊凱和蘇有朋謎之父子相 不光顏值搭 連這個都是絕配
※王俊凱
※王俊凱愛周杰倫,關曉彤愛李易峰,但他才是很多人的偶像?