Layers.py 文件源码

python
阅读 67 收藏 0 点赞 0 评论 0

项目:ISLES2017 作者: MiguelMonteiro 项目源码 文件源码
def convolution_layer_3d(layer_input, filter, strides, padding='SAME'):
    assert len(filter) == 5  # [filter_depth, filter_height, filter_width, in_channels, out_channels]
    assert len(strides) == 5  # must match input dimensions [batch, in_depth, in_height, in_width, in_channels]
    assert padding in ['VALID', 'SAME']
    # w = tf.Variable(initial_value=tf.truncated_normal(shape=filter), name='weights')

    w = tf.Variable(initial_value=xavier_uniform_dist_conv3d(shape=filter), name='weights')

    b = tf.Variable(tf.constant(1.0, shape=[filter[-1]]), name='biases')
    convolution = tf.nn.conv3d(layer_input, w, strides, padding)
    return convolution + b
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号