manishankarbalu / c-dcgan Goto Github PK
View Code? Open in Web Editor NEWWe use Conditional-DCGAN to generate animated faces :couple: and emojis :smiley: using pytorch
We use Conditional-DCGAN to generate animated faces :couple: and emojis :smiley: using pytorch
Hi there,
Thank you for sharing the code. I am new to learn GAN and when I run this code I face this following issue:
Traceback (most recent call last): File "main.py", line 341, in <module> G_log, D_log = train(epoch_max, batch_size) File "main.py", line 316, in train D_loss = train_D(real_images, real_labels) File "main.py", line 218, in train_D real_outputs = D.forward(real_images,real_labels_fill) File "main.py", line 137, in forward x = torch.cat((x, y), dim=1) RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 128 and 32 in dimension 2 at /opt/conda/conda-bld/pytorch_1549624239588/work/aten/src/TH/generic/THTensorMoreMath.cpp:1307
My batch size is 16 and i am running the code for 2 classes with 698 and 500 images respectively. My input images are 256x256 and I did not change any other parameter. These are the size of my x and y respectively where the problem occurs (main.py line 137)
torch.Size([16, 64, 128, 128]) torch.Size([16, 64, 32, 32])
Another problem is this code gives error when more than 2 classes are arranged in data folder.
Any kind of help is much appreciated!!!
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.