pfnet-research / chainer-pix2pix Goto Github PK
View Code? Open in Web Editor NEWchainer implementation of pix2pix
chainer implementation of pix2pix
Hi,
Here is a problem when I tried to run train_facade.py (I have downloaded the dataset). Can you help me with this problem? Thanks :)
“Traceback (most recent call last):
File "/home/wh/wh/chainer-pix2pix-master/train_facade.py", line 119, in
main()
File "/home/wh/wh/chainer-pix2pix-master/train_facade.py", line 70, in main
train_d = FacadeDataset(args.dataset, data_range=(1,300))
File "/home/wh/wh/chainer-pix2pix-master/facade_dataset.py", line 39, in init
img = np.asarray(img).astype("float")
File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 528, in getattr
raise AttributeError(name)
AttributeError: float”
I run your code with slightly different network parameters:
enc = Encoder(in_ch=1)
dec = Decoder(out_ch=37)
dis = Discriminator(in_ch=1, out_ch=37)
After many training iterations I found that only the first channel out of the 37 channels of "out_ch" converges. When checking the "gen_all" output at your out_image module the first channel converged fine but all other channels have values between -1 and -0.8.
Would it be anything else to have in mind when changing encoder's, decoder's and discriminator's channels?
Would it be possible the case that pix2pix cannot learn to produce more output channel than inputs channels?
**UPDATED
Few more notes:
-When tested all other parameters such as network configuration and image dimensions were kept the same
-Dataset had 35000 samples
-The first layer converges impresively well after 4.5 epochs
Any help/advice will be really appreciated.
Thanks,
Alex
Hi,
Thanks for publishing valuable program!
However, I got stuck in the exception problem.
I got the error below on running program.
Does this mean this program no longer work with chainer 2.0.0?
Any reply would be helpful.
python train_facade.py --dataset "./facade/base" --out "./out" --snapshot_interval 10000
GPU: -1
# Minibatch-size: 1
# epoch: 200
load dataset start
from: ./facade/base
range: [1, 300)
load dataset done
load dataset start
from: ./facade/base
range: [300, 379)
load dataset done
Traceback (most recent call last):
File "train_facade.py", line 119, in <module>
main()
File "train_facade.py", line 116, in main
trainer.run()
File "/Users/kkbnart/.pyenv/versions/dcgan/lib/python3.4/site-packages/chainer/training/trainer.py", line 296, in run
update()
File "/Users/kkbnart/.pyenv/versions/dcgan/lib/python3.4/site-packages/chainer/training/updater.py", line 177, in update
self.update_core()
File "/Users/kkbnart/Documents/programming/python/machineLearning/pix2pix/chainer-pix2pix/updater.py", line 73, in update_core
z = enc(x_in, test=False)
File "/Users/kkbnart/Documents/programming/python/machineLearning/pix2pix/chainer-pix2pix/net.py", line 58, in __call__
hs.append(self['c%d'%i](hs[i-1], test=test))
File "/Users/kkbnart/Documents/programming/python/machineLearning/pix2pix/chainer-pix2pix/net.py", line 33, in __call__
h = self.batchnorm(h, test=test)
File "/Users/kkbnart/.pyenv/versions/dcgan/lib/python3.4/site-packages/chainer/links/normalization/batch_normalization.py", line 117, in __call__
kwargs, test='test argument is not supported anymore. '
File "/Users/kkbnart/.pyenv/versions/dcgan/lib/python3.4/site-packages/chainer/utils/argument.py", line 4, in check_unexpected_kwargs
raise ValueError(message)
ValueError: test argument is not supported anymore. Use chainer.using_config
At line 84 in updater.py, do you actually need to unchain x_in given that x_in does not have any creator (basically x_in is created by the user so that it has no reference)?
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.