FPN_Tensorflow icon indicating copy to clipboard operation
FPN_Tensorflow copied to clipboard

FPN fusion_two_layer 函数是自己定义的,部署在openvino上面时,是不是要自己写?

Open HUI11126 opened this issue 4 years ago • 0 comments

`def fusion_two_layer(C_i, P_j, scope): ''' i = j+1 :param C_i: shape is [1, h, w, c] :param P_j: shape is [1, h/2, w/2, 256] :return: P_i ''' with tf.variable_scope(scope): level_name = scope.split('')[1] h, w = tf.shape(C_i)[1], tf.shape(C_i)[2] upsample_p = tf.image.resize_bilinear(P_j, size=[h, w], name='up_sample'+level_name)

    reduce_dim_c = slim.conv2d(C_i,
                               num_outputs=256,
                               kernel_size=[1, 1], stride=1,
                               scope='reduce_dim_'+level_name)

    add_f = 0.5*upsample_p + 0.5*reduce_dim_c

    # P_i = slim.conv2d(add_f,
    #                   num_outputs=256, kernel_size=[3, 3], stride=1,
    #                   padding='SAME',
    #                   scope='fusion_'+level_name)
    return add_f`

HUI11126 avatar Jan 21 '21 09:01 HUI11126