Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
HUI11126 opened this issue Jan 21, 2021 · 0 comments

Comments

@HUI11126
Copy link

`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`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant