Skip to content

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

Description

@HUI11126

`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`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions