Top "Keras-layer" questions

Keras input explanation: input_shape, units, batch_size, dim, etc

For any Keras layer (Layer class), can someone explain how to understand the difference between input_shape, units, dim, etc.? …

neural-network deep-learning keras keras-layer tensor
Error when checking model input: expected convolution2d_input_1 to have 4 dimensions, but got array with shape (32, 32, 3)

I want to train a deep network starting with the following layer: model = Sequential() model.add(Conv2D(32, 3, 3, input_shape=(32, 32, 3))) …

deep-learning keras keras-layer
How do I get the weights of a layer in Keras?

I am using Windows 10, Python 3.5, and tensorflow 1.1.0. I have the following script: import tensorflow as tf import tensorflow.contrib.keras.…

python tensorflow deep-learning keras keras-layer
How to fix "AttributeError: module 'tensorflow' has no attribute 'get_default_graph'"?

I am trying to run some code to create an LSTM model but i get an error: AttributeError: module 'tensorflow' …

python tensorflow keras keras-layer tf.keras
How to add and remove new layers in keras after loading weights?

I am trying to do a transfer learning; for that purpose I want to remove the last two layers of …

python theano keras keras-layer
Tensorflow Allocation Memory: Allocation of 38535168 exceeds 10% of system memory

Using ResNet50 pre-trained Weights I am trying to build a classifier. The code base is fully implemented in Keras high-level …

python tensorflow memory keras-layer resnet
Dimension of shape in conv1D

I have tried to build a CNN with one layer, but I have some problem with it. Indeed, the compilator …

python keras text-classification keras-layer
In Keras, how to get the layer name associated with a "Model" object contained in my model?

I built a Sequential model with the VGG16 network at the initial base, for example: from keras.applications import VGG16 …

keras keras-layer convolutional-neural-network
Negative dimension size caused by subtracting 3 from 1 for 'conv2d_2/convolution'

I got this error message when declaring the input layer in Keras. ValueError: Negative dimension size caused by subtracting 3 from 1 …

python tensorflow neural-network keras keras-layer
Reset weights in Keras layer

I'd like to reset (randomize) the weights of all layers in my Keras (deep learning) model. The reason is that …

python tensorflow machine-learning keras keras-layer