avinash-mishra / gan-style-transfer Goto Github PK
View Code? Open in Web Editor NEWImplementation of GANs for coupon style transfer.
Implementation of GANs for coupon style transfer.
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!
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]
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
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'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.