alexiajm / deep-learning-with-cats Goto Github PK
View Code? Open in Web Editor NEWDeep learning with cats (^._.^)
License: GNU General Public License v3.0
Deep learning with cats (^._.^)
License: GNU General Public License v3.0
first, i want to say thanks so much to Alexia. Now, t need make a folder contain subfolders save images, which be generated by DCGAN. I tried but not success. Help me.
for the wgan-gp?
Thanks!
Very nice cats! Have you thought of trying BEGAN https://arxiv.org/abs/1703.10717 ? Their results on faces look great.
the link to cat dataset returns "503 service unavailable"
When we generate the same number of images as batch_size during training, it performs very well. But when we only want to generate one picture, there is a problem with its brightness. We also set the batch_size to 64 when generating the picture, but this problem still exists when saving a picture. We think it is the normalization of the following line of code.
vutils.save_image(fake_test.data[0:1,:,:,:], './output/%01d.png' % i , normalize=True)
How can we store one image at a time?
We are looking forward to your reply.
My mac os python3.6. How to solve this?
Traceback (most recent call last):
File "Meow_DCGAN.py", line 267, in
for i, data_batch in enumerate(dataset, 0):
File "/usr/local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 212, in next
return self._process_next_batch(batch)
File "/usr/local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 239, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
TypeError: Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 41, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/usr/local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 41, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/usr/local/lib/python3.6/site-packages/torchvision/datasets/folder.py", line 67, in getitem
img = self.transform(img)
File "/usr/local/lib/python3.6/site-packages/torchvision/transforms.py", line 29, in call
img = t(img)
File "/usr/local/lib/python3.6/site-packages/torchvision/transforms.py", line 139, in call
ow = int(self.size * w / h)
TypeError: unsupported operand type(s) for /: 'tuple' and 'int'
I really like your post and the code. In your post, you mentioned that WGAN-GP may cause the image to be blurry. Have you solved the problem or it is due to the Wasserstein loss? Thanks!
I'm interested in your research,But unfortunately, the link of the downloaded data set you provided is invalid. I can only go to the web page and cannot download the data. Could you please provide other downloads?
Not sure what I'm missing but I keep getting this:
File "DCGAN.py", line 43
base_dir = f"{param.output_folder}/run-{run}"
Maybe you could do a simple unweighted average pixel difference over the dataset for the example cats and see if it is not just overfitting on the training data?
I would almost say they don't look distorted enough to be really generated :)
I am confusing about the code in training Discriminator phase:
errD_real = D(x)
errD_real.backward(one)
...
errD_fake = D(x_fake)
errD_fake.backward(one_neg)
But D is
errD_real = D(x)
errD_real.backward(one_neg)
...
errD_fake = D(x_fake)
errD_fake.backward(one)
Shouldn't the weight initialization for SELU be something like:
def selu_weights_init(m):
classname = m.__class__.__name__
if classname.find('Conv') != -1:
m.weight.data.normal_(0.0, 0.5 / math.sqrt(m.weight.numel()))
elif classname.find('BatchNorm') != -1:
size = m.weight.size()
fan_out = size[0] # number of rows
fan_in = size[1] # number of columns
m.weight.data.normal_(0.0, 1.0 / math.sqrt(fan_in))
# Estimated mean, must be around 0
m.bias.data.fill_(0)
(The 0.5 factor for the conv. coming from reading the PyTorch forums about what worked for someone, in other places 1.0 is used)
the Cat Dataset (https://web.archive.org/web/20150703060412/http://137.189.35.203/WebUI/CatDatabase/catData.html)
unable to download.
Thanks for the good code!!!
Can anybody explain the difference between training the real and fake date separately and training them simultaneously. The code backwards the real first then the fake.
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.