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

S operation concatenates global average- and max-pooling support features in depth, and halve dimensions by a convolutional layer to generate salient support features, then T tile a salient support features to make the tiled support features have a same spatial size as query features, so F can concatenate tiled support features to query features #3

Open
God-song opened this issue Nov 2, 2022 · 1 comment

Comments

@God-song
Copy link

God-song commented Nov 2, 2022

image
S operation concatenates global average- and max-pooling support features in depth, and halve dimensions by a convolutional layer to generate salient support features, then T tile a salient support features to make the tiled support features have a same spatial size as query features, so F can concatenate tiled support features to query features

请问,平铺操作是否是pytorch中的repeat操作呢,然后特征连接是否是pytorch中的cat操作?

Excuse me, is the tiling operation a repeat operation in pytorch, and is the feature connection a cat operation in pytorch?

@God-song
Copy link
Author

God-song commented Nov 2, 2022

a=torch.randn(1,3,4,4)
m=torch.randn(1,3,4,4)
conv1=nn.AdaptiveAvgPool2d((1,1))
conv2=nn.AdaptiveMaxPool2d((1,1))
print(a)
b=conv1(a)
print(b)
c=conv2(a)
print(c)
d=torch.cat((b,c),dim=1)
print(d)
print(d.shape)
conv3=nn.Conv2d(6,3,1)
e=conv3(d)
print(e)
print(e.shape)
f = e.repeat(1,1,4,4)
print(f)
print(f.shape)
print("b",m.shape)
g=torch.cat((f,m),dim=1)
print(g)
print(g.shape)

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