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

Training Error, happens with any input style image #13

Open
backnotprop opened this issue Mar 20, 2018 · 7 comments
Open

Training Error, happens with any input style image #13

backnotprop opened this issue Mar 20, 2018 · 7 comments

Comments

@backnotprop
Copy link

backnotprop commented Mar 20, 2018

  • Cuda 9
  • python 2.7
Traceback (most recent call last):
  File "main.py", line 287, in <module>
    main()
  File "main.py", line 40, in main
    train(args)
  File "main.py", line 136, in train
    utils.init_vgg16(args.vgg_model_dir)
  File "/home/ubuntu/train/experiments/utils.py", line 100, in init_vgg16
    vgglua = load_lua(os.path.join(model_folder, 'vgg16.t7'))
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 606, in load_lua
    return reader.read()
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 591, in read
    return self.read_object()
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 521, in wrapper
    result = fn(self, *args, **kwargs)
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 544, in read_object
    return reader_registry[cls_name](self, version)
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 242, in read_nn_class
    attributes = reader.read()
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 593, in read
    return self.read_table()
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 521, in wrapper
    result = fn(self, *args, **kwargs)
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 570, in read_table
    v = self.read()
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 593, in read
    return self.read_table()
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 521, in wrapper
    result = fn(self, *args, **kwargs)
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 570, in read_table
    v = self.read()
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 591, in read
    return self.read_object()
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 521, in wrapper
    result = fn(self, *args, **kwargs)
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 544, in read_object
    return reader_registry[cls_name](self, version)
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 317, in wrapper
    obj = build_fn(reader, version)
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 242, in read_nn_class
    attributes = reader.read()
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 593, in read
    return self.read_table()
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 521, in wrapper
    result = fn(self, *args, **kwargs)
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 570, in read_table
    v = self.read()
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 591, in read
    return self.read_object()
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 521, in wrapper
    result = fn(self, *args, **kwargs)
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 544, in read_object
    return reader_registry[cls_name](self, version)
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 146, in read_tensor
    storage = reader.read()
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 591, in read
    return self.read_object()
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 521, in wrapper
    result = fn(self, *args, **kwargs)
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 544, in read_object
    return reader_registry[cls_name](self, version)
  File "/home/ubuntu/train/experiments/train/local/lib/python2.7/site-packages/torch/utils/serialization/read_lua_file.py", line 165, in read_storage
    return python_class.from_buffer(reader.f.read(size), 'native')
ValueError: buffer size (53728077) must be a multiple of element size (4)
@backnotprop backnotprop changed the title Training Error, happens immediately with any style image Training Error, happens with any input style image Mar 20, 2018
@backnotprop
Copy link
Author

backnotprop commented Mar 20, 2018

I've reverted to Cuda 8 and I get the same issue

@zhanghang1989
Copy link
Owner

This looks like a bug with PyTorch. I will convert the vgg weights later to avoid this issue.

@backnotprop
Copy link
Author

backnotprop commented Mar 21, 2018

@zhanghang1989 yea I figured, I submitted an issue to PyTorch as well.

Is there an alternative I can use for now?

@backnotprop
Copy link
Author

pytorch issue here

@backnotprop
Copy link
Author

I believe my download must've been corrupted ... Ive downloaded a separate vgg file and it seems to be working now... waiting to see how training goes

@zhanghang1989
Copy link
Owner

Great. please keep me posted.

@ss32
Copy link
Contributor

ss32 commented Nov 22, 2020

@backnotprop what directory structure does the training expect? And are labels generated from the directory names or individual images?

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

3 participants