Questions tagged [keras]

Keras is a popular, open-source deep learning API for Python built on top of TensorFlow and is useful for fast implementation. Topics include efficient low-level tensor operations, computation of arbitrary gradients, scalable computations, export of graphs, etc.

Filter by
Sorted by
Tagged with
0
votes
2answers
1k views

Keras' Evaluate function training model on test set

I've been using Keras to do some timeseries predictive neural nets. One thing that's had me staggered is how I was getting an almost 99% accuracy rate on very very noisy and uncorrelated data (I was ...
2
votes
2answers
1k views

Time series prediction without sliding window

I've got a collection of historic log files for a process that repeats daily, roughly the same each day. I want an NN that, from the moment that the daily process starts, estimates what time the ...
8
votes
2answers
2k views

Earlystopping in multi-output deep learning

When working with a neural network with more than one output, what is generally advised as the best strategy for early-stopping the training process? Given that I am currently monitoring the net ...
1
vote
1answer
5k views

Accuracy doesn't match in Keras

I am using Keras to classify images. I am following the Keras blog. The accuracy from predict_generator is not matching with the accuracy obtained from the confusion matrix, which I am computing ...
1
vote
2answers
1k views

Word vectors as input

I have a corpus on which I want to perform sentiment analysis using LSTM and word embeddings. I have converted the words in the documents to word vectors using Word2Vec. My question is how to input ...
19
votes
3answers
73k views

How to get predictions with predict_generator on streaming test data in Keras?

In the Keras blog on training convnets from scratch, the code shows only the network running on training and validation data. What about test data? Is the validation data the same as test data (I ...
1
vote
2answers
4k views

How to deal with situation where LSTM fails to learn (constantly makes the same incorrect prediction) [closed]

I am trying to use LSTM neural networks in order to make a song composer. Basically this is based of a text generator (tries to predict the next character after looking at a sequence of characters) ...
10
votes
3answers
61k views

Switching Keras backend Tensorflow to GPU

I use Keras-Tensorflow combo installed with CPU option (it was said to be more robust), but now I'd like to try it with GPU-version. Is there a convenient way to switch? Or shall I re-install fully ...
16
votes
1answer
33k views

How to define a custom performance metric in Keras?

I tried to define a custom metric fuction (F1-Score) in Keras (Tensorflow backend) according to the following: ...
0
votes
2answers
2k views

Fitting error with Neural Network Grid Search in Keras

I try to build a NN classifier on the well-known MNIST image database with Sklearn's Grid Search according the following: ...
0
votes
1answer
118 views

Extracting the code from Keras

Suppose I write a program in Keras for MNIST data set. I used TensorFlow as my backend in Keras. Is it possible in any way that I can extract the backend code used for TensorFlow that has been used by ...
13
votes
2answers
33k views

Validation loss and accuracy remain constant

I am trying to implement this paper on a set of medical images. I am doing it in Keras. The network essentially consists of 4 conv and max-pool layers followed by a fully connected layer and soft max ...
1
vote
1answer
1k views

Similarity between bordermode and zero padding in Keras

In Keras, the border_mode = 'valid' doesn't zero pad the input. Thus, we subsequently get an output feature map that is not the same size as the input. Likewise, ...
235
votes
11answers
327k views

How to set class weights for imbalanced classes in Keras?

I know that there is a possibility in Keras with the class_weights parameter dictionary at fitting, but I couldn't find any example. Would somebody so kind to ...
18
votes
9answers
51k views

How can I get prediction for only one instance in Keras?

When I request Keras to apply prediction with a fitted model to a new dataset without label like this: model1.predict_classes(X_test) it works fine. But when I ...
3
votes
1answer
3k views

Principle behind seq2seq model's example in keras?

I am referring to seq2seq model's example code in keras (https://github.com/fchollet/keras/blob/master/examples/addition_rnn.py). The model is : ...
11
votes
1answer
13k views

What is the significance of model merging in Keras?

I have learned that Keras has a functionality to "merge" two models according to the following: ...
1
vote
1answer
9k views

Error in model.fit() method in Keras

I was building a model for a classification problem in Keras for which I used the KerasClassifier, the wrapper scikit-learn. Below is the code for the same. ...
7
votes
1answer
21k views

Regression in Keras

I was trying to implement a regression model in Keras, but am unable to figure out how to calculate the score of my model, i.e., how well it performed on my dataset. ...
8
votes
1answer
2k views

Recurrent neural network multiple types of input Keras

For a project I want to use recurrent neural networks, however my knowledge on this subject is still somewhat limited. I do have some experience with convolutional nets and traditional neural networks....
2
votes
1answer
993 views

MLP on Iris Data not working but it does fine on MNIST - Keras

So I'm a little bit baffled. I have just started working with the Keras framework for Python (which is awesome by the way!). However just trying a few simple test of neural networks has got me a bit ...
1
vote
4answers
30k views

String Values in a data frame in Pandas

Suppose I have a data frame like this : ...
1
vote
0answers
49 views

Find boundaries for a smallest mean error

I am new at deep learning, but willing to learn. I have this problem. Have 5 inputs: A,B,C,D,E(columns in CSV) that gives me 1 or 0. A,B,C,D or E can be between 0 and 100. For example, a ...
58
votes
4answers
73k views

Does batch_size in Keras have any effects in results' quality?

I am about to train a big LSTM network with 2-3 million articles and am struggling with Memory Errors (I use AWS EC2 g2x2large). I found out that one solution is to reduce the ...
0
votes
2answers
2k views

cifar10 official keras example not giving expected accuracy, using sigmoid seems better than relu

In the official Keras example cifar10 there is the following code to train a CNN using keras10. When I tried it, my neural net would not learn at all, I always get around a 10% acuracy, which is ...
7
votes
1answer
16k views

border_mode for convolutional layers in keras

Keras has two border_mode for convolution2D, same and valid. Could anyone explain what "same" does or point out some documentation? I could not find any document on the net (except people asking that ...
9
votes
2answers
42k views

Cross Validation in Keras

Suppose I would like to train and test the MNIST dataset in Keras. The required data can be loaded as follows: ...
5
votes
2answers
242 views

Choice of objective function for log transformed data for feedforward NN

I am processing some data using a feedforward neural network in Keras. I have noticed that if I log transform the data, the model trains better, however the error metric on the transformed data doesn'...
14
votes
2answers
33k views

Reshaping of data for deep learning using Keras

I am a beginner to Keras and I have started with the MNIST example to understand how the library actually works. The code snippet of the MNIST problem in the Keras example folder is given as : ...
5
votes
1answer
513 views

Solving multi label image classification using TimeDistributed dense layer

I have a multi label image dataset having 5 labels. Each image can have more than one label at the same time. I am using a convolutional neural network to extract features and those extracted features ...
2
votes
0answers
2k views

Image Captioning example in keras Approach?

I have used the keras example code of Image Captioning in that I have used the VGG pretrained model for extracting image features(4096) and for text part I have done indexing to the unique words and ...
39
votes
1answer
19k views

The difference between `Dense` and `TimeDistributedDense` of `Keras`

I am still confused about the difference between Dense and TimeDistributedDense of Keras ...
6
votes
1answer
1k views

LSTM neural network for music generation

I am doing a project where I have to train a LSTM neural network to generate music. The first step is of course training it. I am using Keras on top of Theano for this task and music21 for feature ...
6
votes
1answer
4k views

Image Captioning in Keras

I am trying to implement demo of Image Captioning system from Keras documentation. From the documentation I could understand training part. ...
32
votes
1answer
66k views

What is the best Keras model for multi-class classification?

I am working on research, where need to classify one of three event WINNER=(win, draw, lose) ...
19
votes
4answers
21k views

Hyperparameter search for LSTM-RNN using Keras (Python)

From Keras RNN Tutorial: "RNNs are tricky. Choice of batch size is important, choice of loss and optimizer is critical, etc. Some configurations won't converge." So this is more a general question ...
9
votes
1answer
727 views

Properties for building a Multilayer Perceptron Neural Network using Keras?

I am trying to build and train a multilayer perceptron neural network that correctly predicts what president won in what county for the first time. I have the following information for training data. ...
23
votes
2answers
10k views

Choosing between TensorFlow or Theano as backend for Keras

Keras supports both TensorFlow and Theano as backend: what are the pros/cons of choosing one versus the other, besides the fact that currently not all operations are implemented with the TensorFlow ...

1
48 49 50 51
52