ennauata / housegan

House-GAN: Relational Generative Adversarial Networks for Graph-constrained House Layout Generation
https://ennauata.github.io/housegan/page.html
Other
240 stars 67 forks source link

try to solve this error: RuntimeError: The size of tensor a (3) must match the size of tensor b (4) at non-singleton dimension 0 #2

Closed mahaidong closed 7 months ago

mahaidong commented 4 years ago

try to solve this error: RuntimeError: The size of tensor a (3) must match the size of tensor b (4) at non-singleton dimension 0

and if using cpu:

if torch.cuda.is_available() :
    generator.load_state_dict(torch.load(checkpoint))
else: 
    generator.load_state_dict(torch.load(checkpoint, map_location=torch.device('cpu')))
ennauata commented 4 years ago

Thanks for pointing this out, I will look into this error soon.