Skip to content

struct.error: unpack requires a buffer of 4 bytes #42

@MFarooqAit

Description

@MFarooqAit

Dear author,
Thank you so much for sharing a useful code.
I able to run your evaluation code, but face the following error during runing of training code:
File "main.py", line 41, in main
train(args)
File "main.py", line 135, in train
utils.init_vgg16(args.vgg_model_dir)
File "/home2/st118370/models/PyTorch-Multi-Style-Transfer/experiments/utils.py", line 100, in init_vgg16
vgglua = load_lua(os.path.join(model_folder, 'vgg16.t7'))
File "/home2/st118370/anaconda3/envs/pytorch-py3/lib/python3.7/site-packages/torchfile.py", line 424, in load
return reader.read_obj()
File "/home2/st118370/anaconda3/envs/pytorch-py3/lib/python3.7/site-packages/torchfile.py", line 310, in read_obj
typeidx = self.read_int()
File "/home2/st118370/anaconda3/envs/pytorch-py3/lib/python3.7/site-packages/torchfile.py", line 277, in read_int
return self._read('i')[0]
File "/home2/st118370/anaconda3/envs/pytorch-py3/lib/python3.7/site-packages/torchfile.py", line 271, in _read
return struct.unpack(fmt, self.f.read(sz))
struct.error: unpack requires a buffer of 4 bytes

how can i resolve this problem? kindly guide. thanks

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