Skip to content

Wrong dimension order in unpatchify? #6

@Xact-sniper

Description

@Xact-sniper

minRF/dit.py

Lines 287 to 288 in 72feb0c

x = x.reshape(shape=(x.shape[0], h, w, p, p, c))
x = torch.einsum("nhwpqc->nchpwq", x)

Should this not be:

    x = x.reshape(shape=(x.shape[0], h, w, c, p, p))
    x = torch.einsum("nhwcpq->nchpwq", x)

I would expect unpatchify( patchify( image ) ) == image but as is that is not the case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions