简体   繁体   English

我需要一些关于张量流中分离 3D 卷积的帮助

[英]I need some help about separated 3D convolution in tensorflow

I am student and studying Deep Neural Network.我是学生,正在学习深度神经网络。

I saw one paper which is titled:我看到一篇论文,标题是:

" 3D Depthwise Convolution: Reducing Model Parameters in 3D Vision Tasks " 3D Depthwise Convolution:减少 3D 视觉任务中的模型参数

I need to implement the 3D Separable Convolution introduced in this paper.我需要实现本文介绍的3D Separable Convolution。

I want you to point out my sources.我要你指出我的消息来源。

separable_conv3d.py 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

This is the image I referenced.这是我参考的图片。

在此处输入图片说明

Any criticism is welcome.欢迎任何批评。 This is REAL.这是真的。

I did not test your code but as I understood while selecting features in the for loop you use 3 dimensions and put c in to 3rd dimension, but as far as I know 3D convolution is 4D so it would be correct if you add additional dimension.我没有测试您的代码,但据我了解,在 for 循环中选择特征时,您使用 3 维并将 c 放入第 3 维,但据我所知,3D 卷积是 4D,因此如果您添加额外的维度,它将是正确的。 I will be testing and editing your code soon.我将很快测试和编辑您的代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM