Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MFarooqAit opened this issue Oct 27, 2020 · 1 comment
Open

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

MFarooqAit opened this issue Oct 27, 2020 · 1 comment

Comments

@MFarooqAit
Copy link

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

@zhanghang1989
Copy link
Owner

I haven't seen this issue. Sorry that this repo is no longer maintained actively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants