Coder Social home page Coder Social logo

gan-style-transfer's Introduction

Hi there ๐Ÿ‘‹

linkedin badge stackoverflow badge hackerrank badge

gan-style-transfer's People

Contributors

avinash-mishra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gan-style-transfer's Issues

ModuleNotFoundError: No module named 'torch.utils.serialization'

I tried to use the pre-trained model. When I executed following command in google colab ! python main.py eval --content-image images/0.jpg --style-image images/2.jpg --model models/21styles.model --content-size 1024 , it showed below error.


Traceback (most recent call last):
  File "main.py", line 25, in 
    import utils
  File "/content/drive/Shareddrives/ML/style-transfer/experiments/utils.py", line 17, in 
    from torch.utils.serialization import load_lua
ModuleNotFoundError: No module named 'torch.utils.serialization'

Any way around this ? Thanks!

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!

I found an error. Can you help me to fix it?

0% 0/4 [00:00<?, ?it/s]Traceback (most recent call last):
  File "main.py", line 320, in <module>
    main()
  File "main.py", line 41, in main
    train(args)
  File "main.py", line 171, in train
    style_v = utils.subtract_imagenet_mean_batch(style_v)
  File "/content/drive/MyDrive/msgnet/gan-style-transfer/experiments/utils.py", line 69, in subtract_imagenet_mean_batch
    return batch - Variable(mean)
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!
  0% 0/4 [00:00<?, ?it/s]

TypeError: 'NoneType' object is not callable

Traceback (most recent call last):
File "main.py", line 320, in
main()
File "main.py", line 41, in main
train(args)
File "main.py", line 145, in train
utils.init_vgg16(args.vgg_model_dir)
File "/content/drive/Shareddrives/ML/style-transfer/experiments/utils.py", line 103, in init_vgg16
for (src, dst) in zip(vgglua.parameters()[0], vgg.parameters()):

I executed following command ! python main.py --epochs 2 in the colab. And its showing the above error.

Anyone could help please

'Namespace' object has no attribute 'model'

I have an issue when I train a new model, such as
C:\Users\MyUser\anaconda3\envs\exe\lib\site-packages\torchvision\transforms\transforms.py:257: UserWarning: The use of the transforms.Scale transform is deprecated, please use transforms.Resize instead.
"please use transforms.Resize instead.")
Traceback (most recent call last):
File "main.py", line 321, in
main()
File "main.py", line 41, in main
train(args)
File "main.py", line 128, in train
model_dict = torch.load(args.model) # or args.resume, matching what's in the line with style_model.load_state_dict
AttributeError: 'Namespace' object has no attribute 'model'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.