Skip to content

python scripts/translate_images.py PATH_TO_TRAINED_MODEL -n 100 raise RuntimeError #25

@sonwe1e

Description

@sonwe1e

It raise RuntimeError when I run python ./uvcgan-main/scripts/translate_images.py ./uvcgan-main/outdir/selfie2anime/model_d\(cyclegan\)_m\(cyclegan\)_d\(basic\)_g\(vit-unet\)_cyclegan_vit-unet-12-self-lsgan-paper-cycle_high-256/ -n 100
image
And I found the shape of X and shape of embed is not the same
image
The position of error is

    def forward(self, x):
        # x     : (N, L, input_features)
        # embed : (1, height * width, embed_features)
        #       = (1, L, embed_features)
        embed = self.embed(self.y_const, self.x_const)
        print(x.shape)
        print(embed.shape)

        # embed : (1, L, embed_features)
        #      -> (N, L, embed_features)
        embed = embed.expand((x.shape[0], *embed.shape[1:]))
        print(x.shape)
        print(embed.shape)

        # result : (N, L, embed_features + input_features)
        result = torch.cat([embed, x], dim=2)

        # (N, L, features)
        return self.output(result)

Looking forward to your reply.

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions