Kibeom-Hong / AesPA-Net

Official Implementation of AesPA-Net: Aesthetic Pattern-Aware Style Transfer Networks
36 stars 2 forks source link

torchfile error #6

Open PMPBinZhang opened 1 year ago

PMPBinZhang commented 1 year ago

Hi, sorry to bother your again, when I run in Linux system, this command, torchfile.load('./baseline_checkpoints/vgg_normalised_conv5_1.t7'), still generate error struct.error: unpack requires a buffer of 4 bytes.

ki-swatchon commented 1 year ago

Hmm... I used the torchfile version 0.1.0. Could you check the version of "torchfile"?

PMPBinZhang commented 1 year ago

I also use version 0.1.0. otherwise, when I use torchfile, I need to modify xrange to range, have you modified this?

ki-swatchon commented 1 year ago

No I didn't modify..!

Could you download the pre-trained weight directly via https://drive.google.com/file/d/1M5KBPfqrIUZqrBZf78CIxLrMUT4lD4t9/view?usp=sharing ?

PMPBinZhang commented 1 year ago

but if I don't modify, I got the error NameError: name 'xrange' is not defined , it exists in torchfile.py line 288. I'll try your newest file. If I get troubles, Sorry to bother you, thx for your reply

ki-swatchon commented 1 year ago

Sorry for late reply. Could you replace xrange to range?

YangWulve commented 7 months ago

I met this error the same. A structure error "struct.error: unpack requires a buffer of 4 bytes" occurs when oading VGG: File "/home/xxx/AesPA-Net-main/baseline.py", line 93, in init pretrained_vgg = torchfile.load('./baseline_checkpoints/vgg_normalised_conv5_1.t7') with torchfile == 0.1.0