Comments (5)
Couple questions, divamgupta. Which version of keras did you try it on? Did you try changing anything to get it to work, or did you run the model as is? I am having some trouble training as well.
Thanks
from keras-dcgan.
You might need to closer match DCGAN's original setup - feeding the samples and data as separate minibatches to the discriminator is important. See the line here and just before https://github.com/Newmu/dcgan_code/blob/master/faces/train_uncond_dcgan.py#L138
from keras-dcgan.
Dear @jacobgil
Thanks for sharing and nice implementation,
I want to generate 5 different type gray scale images (on my dataset) the image input should be hdf5 format?
Thanks in advance!
from keras-dcgan.
@MinaRe The images should be in any format that can be read with opencv - i.e .jpg, .png, .pgm etc.
from keras-dcgan.
@MinaRe
I'm not sure what is the question.
One way to load images would to be just use opencv, and load them into numpy arrays.
import cv2
img = cv2.imread("/home/MinaRe/img.png", 0)
img = cv2.imresize(img, (32, 32))
And then set X_train to be these images.
Since you have many images and the RAM space might be a bottleneck, you will probably want to load a next batch of images from disk in the training loop.
Hopefully that helps.
from keras-dcgan.
Related Issues (20)
- Potential label error? HOT 2
- 127.5 HOT 3
- ValueError: Negative dimension size caused by subtracting 2 from 1 for 'max_pooling2d_1/MaxPool' HOT 11
- What's the meaning of this code? HOT 2
- Do you have a trained model? Thanks HOT 1
- noise sampling
- Why do you change d.trainable twice after d.compile during train? HOT 1
- Loss Function
- Other dataset HOT 2
- Why using different noise for training `d` and `d_on_g`
- AttributeError: 'int' object has no attribute 'ndim' HOT 4
- Why did not use Conv2DTranspose rather than Conv2D in the generator HOT 1
- ValueError: Variable batch_normalization_1/moving_mean/biased already exists HOT 1
- ValueError: all the input arrays must have same number of dimensions
- Activation function of generator and discriminator?
- TypeError: __init__() missing 1 required positional argument: 'units' HOT 1
- where is the generator weights? HOT 1
- Train on custom datasets
- Python error 'int' object has no attribute 'shape' HOT 1
- ImportError: cannot import name 'BatchNormalization' from 'keras.layers.normalization' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keras-dcgan.