Skip to content
Discussion options

You must be logged in to vote

Hi Thanks for pointing out this issue. This seems to be a design option, and also a code typo here.
This issue originate whether to merge and downsample along Z axis, initially, it was

        x0 = x[:, :, 0::2, 0::2, :]  # B D H/2 W/2 C
        x1 = x[:, :, 1::2, 0::2, :]  # B D H/2 W/2 C
        x2 = x[:, :, 0::2, 1::2, :]  # B D H/2 W/2 C
        x3 = x[:, :, 1::2, 1::2, :]  # B D H/2 W/2 C
        x = torch.cat([x0, x1, x2, x3], -1)  # B D H/2 W/2 4*C

And yes, after discussion on the 3D, the patch merging should be:

            x0 = x[:, 0::2, 0::2, 0::2, :]
            x1 = x[:, 1::2, 0::2, 0::2, :]
            x2 = x[:, 0::2, 1::2, 0::2, :]
            x3 = x[:, 0::2, 0::2, 1::2, :…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@GYDDHPY
Comment options

Answer selected by GYDDHPY
Comment options

You must be logged in to vote
2 replies
@wyli
Comment options

wyli Jul 29, 2022
Collaborator

@function2-llx
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants