Comments (8)
Try resizing the input images to same size - as in the paper / implementation here.
The problem can be, when you downsample from say image of size (5,5) to half , you get (2,2) and upsampling it gives (4,4) , hence the error.
from keras-gan.
@MinuteswithMetrics could you further explain your setup? As in what are the dimensions of your images? What GAN implementation are you trying to train? And on what line do you get this error?
from keras-gan.
from keras-gan.
How are you using the mask? If you follow the folder structure I use for CycleGAN and pix2pix (i.e. the ones that are created by using the download scripts for both models) and use the data loaders that I have implemented it should work.
from keras-gan.
from keras-gan.
So if you want the model to condition its prediction on the mask then you will need to scale both the mask and the images to the same dimensions, and also the same number of channels. The data loader for pix2pix assumes that the images are concatenated by width (like this https://raw.githubusercontent.com/affinelayer/pix2pix-tensorflow/master/docs/ab.png), where the image you want to condition on is positioned on the right and the image you would like the model to produce is on the left. If you arrange your images like this you should be able to use the data loader for pix2pix.
from keras-gan.
from keras-gan.
I notice that if I resize images to a power of 2, such as 128, it works. But if I try 200, I get the same error A Concatenate layer requires inputs with matching shapes except for the concat axis. Got inputs shapes:
.
from keras-gan.
Related Issues (20)
- when training CGAN, raise AttributeError: 'list' object has no attribute 'keys' in the following code HOT 5
- About pix2pix cannot be executed
- [Pix2Pix] Use fit_generator to speed up training process
- Why d_loss = 0.5 * np.add(d_loss_real, d_loss_fake) ? HOT 7
- cGAN: Using Multi label with different number of classes
- DCGAN can only generate noise images HOT 5
- (WGAN_GP)BatchNormalization in critic
- Adversarial Autoencoder training procedure does not correspond to procedure described in paper
- SRGAN - Generated image got PINK overlay all the time ? How to solve this ? HOT 1
- StarGAN & StyleGAN any chance ?
- Cannot import 'Adam' for keras optimizers while testing acgan HOT 1
- ACGAN: Difference multiplication and concatenation of embedding and noise
- pix2pix download dataset
- ImportError: cannot import name 'DataLoader' from 'data_loader'
- Where can I find and download some pre-trained model?
- Project dependencies may have API risk issues
- SRGAN dataset is not available
- when training SGAN for cifar10 and mnist dataset, raised the "AttributeError: 'list' object has no attribute 'keys' "in the following code lones
- cGAN with multi-labels of multi-classes HOT 1
- Keras GAN
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-gan.