Questions tagged [keras-layer]

1512 questions
0
votes
1 answer

Keras: Syntax clarification

Newbie in keras: I am trying to understand the syntax used in keras. Syntax that I am having difficult in understanding is while building a network. I have seen in number of places as also described in following code. Statements like: current_layer…
Su JK
  • 161
  • 1
  • 5
  • 13
0
votes
1 answer

A custom alternating update rule with keras

I would like to use an alternating update rule with keras. I.e. per-batch I would like to call a regular gradient-based step, and next call a custom step. I thought about implementing it by either inheriting an optimizer or a callback (and use the…
Yuval Atzmon
  • 5,645
  • 3
  • 41
  • 74
0
votes
0 answers

CNN binary classifier performing poorly

I'm building a neural network to classify images that have an email address written on them. The positive folder contains images with email addresses written on top of the picture, in different fonts, colors, sizes and positions. The negative folder…
0
votes
1 answer

Broadcasting issue when adding Keras Lambda layer with different size input and output

I have searched and found similar problems, but none that seem to be the same issue as what I'm facing. I'm trying to implement a neural network with Keras using Theano backend (both up to date), which involves a Lambda layer that takes the…
hughes
  • 27
  • 3
0
votes
1 answer

Maxing the last layer in keras LSTM

This question might be very specific application related but I was blocked and I thought this is a good place to ask. Let's say we have an LSTM in Keras that is sequence to sequence, for example Part of Speech Tagger. The last layer gives me,…
Rouzbeh
  • 2,141
  • 1
  • 11
  • 19
0
votes
1 answer

Weighing a Tensor in Keras

I have a really simple issue that seems to have no built-in solution in Keras. Here' my problem: I have a (50,) dimensional tensor (layer 1's output) which is supposed to be multiplied to a (50, 49) dimensional tensor. These tensors are the output…
Rafael
  • 651
  • 13
  • 30
0
votes
1 answer

Accessing Input Layer data in Tensorflow/Keras

I am trying to replicate a neural network for depth estimation. The original authors have taken a pre-trained network and added between the fully connected layer and the convolutional layer a 'Superpixel Pooling Layer'. In this layer, the…
0
votes
1 answer

How can I create a model which is starts with a single convolution layer and then its output given to two different convolution layers

Can I generate a Model in keras which is not sequencial, i.e can I design a model with two train of cascaded convolution layer but the starting input is a common convolution output.
0
votes
1 answer

ValueError when Fine-tuning Inception_v3 in Keras

I am trying to fine-tune pre-trained Inceptionv3 in Keras for a multi-label (17) prediction problem. Here's the code: # create the base pre-trained model base_model = InceptionV3(weights='imagenet', include_top=False) # add a new top layer x =…
Clark Chong
  • 121
  • 2
0
votes
0 answers

Keras cnn model output shape doesn't match model summary

I am trying to use the convolution part of ResNet50() model, as this: #generate batches def get_batches(dirname, gen=image.ImageDataGenerator(), shuffle=True, batch_size=4, class_mode='categorical', target_size=(224,224)): return…
user3768495
  • 4,077
  • 7
  • 32
  • 58
0
votes
1 answer

Keras merge/concatenate models outputs as a new layers

I want to use pretrained models' convolutionnal feature maps as input features for a master model. inputs = layers.Input(shape=(100, 100, 12)) sub_models = get_model_ensemble(inputs) sub_models_outputs = [m.layers[-1] for m in…
Guillaume Chevalier
  • 9,613
  • 8
  • 51
  • 79
0
votes
1 answer

Convolution Neural Network model architecture

I'm working on Facial expressions recognition with Keras. I've a dataset with 72 000 images. I'm using 80% for Train, 10% for Validation and 10 % for Test. All the images are 48 x 48 on grayscale mode. My model architecture is like this : model =…
Mejdi Dallel
  • 573
  • 9
  • 24
0
votes
1 answer

keras layers tutorial and samples

I am trying to code and learn different neural network models. I am having a lot of complication with input dimensionality. I am looking for some tutorial that shows differences in layers and how to set input and outputs for each layers.
ida
  • 1,011
  • 1
  • 9
  • 17
0
votes
1 answer

Error with CNN + RNN "__init__() takes at least 4 arguments (4 given)"

I recently took a tutorial about Deep learning and I am now trying to creat one by myself. The Idea is to take a video, split it in single frames and feed it through an Neural Network. Because it is jpg i though of an CNN. But I don't categorize…
Tobias
  • 9
  • 8
0
votes
2 answers

Where I can find the best best step by step training for building LSTM in Keras?

Team, I wonder of anyone has found a good (for dummies :-) documentation for creating LSTM networks in Keras? Specifically about the expected size of the input, layers and output. E.g. Expected input batch shape: (batch_size, timesteps, data_dim).…
Antonio
  • 307
  • 2
  • 11