Comments (7)
from tensorflow-with-khom.
Your input has to match the expected format of the input layer of your model. You can use reshape to get the right format, expected the dimension match, otherwise you'll need to pad the missing dimensions.
from tensorflow-with-khom.
from tensorflow-with-khom.
Might be
Problem with this line model.add(layers.Conv2D(32, (3, 3), activation='relu', input_shape=(32, 32, 1))) Input dataset has RGB images input_shape should be (32,32,3) where 3 stands for 3 RGB channels and whereas '1' is used for grayscale image
from tensorflow-with-khom.
from tensorflow-with-khom.
finally corrected code:
`def make_discriminator_model():
model = tf.keras.Sequential()
model.add(layers.Conv2D(64, (5, 5), strides=(2, 2), padding='same',
input_shape=[14, 14, 1]))
# model.add(layers.Conv2D(64, (5, 5), strides=(2, 2), padding='same',
# input_shape=[28, 28, 1]))
model.add(layers.LeakyReLU())
model.add(layers.Dropout(0.3))
model.add(layers.Conv2D(128, (5, 5), strides=(2, 2), padding='same'))
model.add(layers.LeakyReLU())
model.add(layers.Dropout(0.3))
model.add(layers.Flatten())
model.add(layers.Dense(1))
return model`
from tensorflow-with-khom.
model.add(layers.Conv2D(64, (5, 5), strides=(2, 2), padding='same',input_shape=[28, 28, 1]))
change this to :
model.add(layers.Conv2D(64, (5, 5), strides=(2, 2), padding='same',input_shape=[14, 14, 1]))
from tensorflow-with-khom.
Related Issues (15)
- IndentationError: unexpected indent
- ImportError: cannot import name 'Adam' from 'keras.optimizers' (/opt/conda/lib/python3.7/site-packages/keras/optimizers.py) HOT 2
- ModuleNotFoundError: No module named 'tensorflow.examples' HOT 2
- gan-issue
- TypeError: ('Keyword argument not understood:', 'stridges') HOT 2
- NameError: name 'ratios' is not defined
- AttributeError: 'AxesImage' object has no attribute 'layout' HOT 2
- SyntaxError: invalid syntax
- NameError: name 'annot' is not defined HOT 3
- TypeError: Got an unexpected keyword argument 'label' HOT 2
- AttributeError: module 'keras.api._v2.keras.datasets.mnist' has no attribute 'load_dat' HOT 2
- SyntaxError: unexpected character after line continuation character HOT 2
- imshow() missing 1 required positional argument: 'X' HOT 2
- No module named 'tensorflow.keras'
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 tensorflow-with-khom.