netG = STAGE2_G(Stage1_G)
netG.apply(weights_init)
state_dict = 
torch.load(cfg[“NET_G”],
map_location=lambda storage, loc: storage)
netG.load_state_dict(state_dict)

This piece of code throws this error:

RuntimeError: inconsistent tensor size, expected tensor [16384 x 228]
and src [24576 x 228] to have the same number of elements, but got
3735552 and 5603328 elements respectively at /opt/conda/conda-
bld/pytorch_1503961620703/work/torch/lib/TH/generic/THTensorCopy.c:86

I’m fairly new to PyTorch and I’m trying to to run https://github.com/hanzhanggit/StackGAN-Pytorch 1
Any way to reshape the tensors? The length is the same