我需要一些关于张量流中分离的 3D 卷积的帮助
I need some help about separated 3D convolution in tensorflow
我是学生,正在学习深度神经网络。
我看到一篇论文,标题是:
"3D Depthwise Convolution:减少 3D Vision 任务中的模型参数"
我需要实现本文介绍的3D Separable Convolution
我希望你指出我的消息来源。
separable_conv3d.py
def separable_conv3d(input, output_dim, depth_filter_channel=1, strides=1, padding='SAME', name=None):
input_tensor_channel = input.get_shape().as_list()[-1]
kernel1 = tf.Variable(tf.truncated_normal(shape=[batch_frame, 3, 3, input_tensor_channel, depth_filter_channel], stddev=0.1))
feature_list = []
for c in range(0, len(input_tensor_channel)):
feature1 = conv3d(input.shape[:, :, c], weight=kernel1, strides=strides, padding=padding, name=name)
feature_list.append(feature1)
total_feature = tf.concat(feature_list, axis=-1)
total_tensor_channel = total_feature.get_shape().as_list()[-1]
kernel3 = tf.Variable(tf.truncated_normal(shape=[1, 1, 1, total_tensor_channel, output_dim]))
pw1 = conv3d(input=total_feature, weight=kernel3, strides=strides, padding=padding, name=name)
return pw1
这是我引用的图片。
欢迎大家批评指正。这是真实的。
我没有测试你的代码,但据我所知,在 for 循环中选择特征时你使用了 3 维并将 c 放入第 3 维,但据我所知,3D 卷积是 4D,所以如果你添加额外的维度。
我将很快测试和编辑您的代码。
我是学生,正在学习深度神经网络。
我看到一篇论文,标题是:
"3D Depthwise Convolution:减少 3D Vision 任务中的模型参数"
我需要实现本文介绍的3D Separable Convolution
我希望你指出我的消息来源。
separable_conv3d.py
def separable_conv3d(input, output_dim, depth_filter_channel=1, strides=1, padding='SAME', name=None):
input_tensor_channel = input.get_shape().as_list()[-1]
kernel1 = tf.Variable(tf.truncated_normal(shape=[batch_frame, 3, 3, input_tensor_channel, depth_filter_channel], stddev=0.1))
feature_list = []
for c in range(0, len(input_tensor_channel)):
feature1 = conv3d(input.shape[:, :, c], weight=kernel1, strides=strides, padding=padding, name=name)
feature_list.append(feature1)
total_feature = tf.concat(feature_list, axis=-1)
total_tensor_channel = total_feature.get_shape().as_list()[-1]
kernel3 = tf.Variable(tf.truncated_normal(shape=[1, 1, 1, total_tensor_channel, output_dim]))
pw1 = conv3d(input=total_feature, weight=kernel3, strides=strides, padding=padding, name=name)
return pw1
这是我引用的图片。
欢迎大家批评指正。这是真实的。
我没有测试你的代码,但据我所知,在 for 循环中选择特征时你使用了 3 维并将 c 放入第 3 维,但据我所知,3D 卷积是 4D,所以如果你添加额外的维度。 我将很快测试和编辑您的代码。