Questions tagged [keras]

Open source high-level neural network library for Python and R. Is capable of using TensorFlow or Theano as backend.

156 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
374 views

traditional state-space models and LSTMs

I am trying to understand the nature of LSTMs in relation to intuitions from traditional state-space models (e.g., Kalman filtering). The code below aims to simulate a simple univariate linear state-...
4
votes
1answer
766 views

Trouble training LSTM for sequence to sequence learning of sensor time series

I'm experimenting with using RNNs/LSTMs in place of a Kalman Filter (KF) for sensor fusion. I'm struggling to make much progress, and would appreciate some feedback/advice. I have several multi-...
3
votes
0answers
24 views

Are there extant deep learning analogs to random coefficient (aka mixed) models?

Random coef models, applied to longitudinal data, capture response heterogeneity by cross-sectional unit. I've got a longitudinal prediction problem, in which I know that some "features" (or ...
3
votes
0answers
109 views

Image classification with large images

I am new to image classification and hope to set up a model which will classify large images (I am using R keras). Each image will represent a 10m by 10m square with pixels representing 1 cm. I need ...
3
votes
0answers
36 views

Bagging of models with link functions

I'm trying to predict proportion data, and I've got a small dataset (~4000), so holding out a test and validation set isn't practical. However, bagging is practical because the cost of training isn't ...
3
votes
1answer
605 views

Keras: val_loss decreases while loss increases

I set up a model in keras (in python 2.7) to predict the next stock price in a particular sequence. The model I used is shown below (edited to fit this page): ...
3
votes
0answers
148 views

Is this normal convolution or something special?

I am currently studying this paper (page 53) (mirror), in which the suggest convolution to be done in a special manner. This is the formula: \begin{equation} \tag{1}\label{1} q_{j,m} = \sigma \left(...
2
votes
0answers
70 views

Accuracy of Keras Model is Very Low for Identifying Differently Colored Objects

I am using transfer learning approach to train my keras model to identify objects which have same structure but the colors are different i.e objects are to be identified by their respective color. ...
2
votes
0answers
262 views

How to choose suitable Autoencoder (LSTM) architecture?

I am new to Autoencoders and I am a bit confused on which model to try for my situation and what is the difference between all the different models I have seen in tutorials. So, I have a set of time-...
2
votes
0answers
166 views

Training a bidirectional LSTM is unstable

I'm trying to solve timeseries classification problem. That's my model: ...
2
votes
0answers
821 views

Validation loss is less than training loss by 5 units. How this result is interpreted?

Iam training a Keras model for end-to-end speech recognition. I have my own dataset of speech containing about 400 wave files. Text transcriptions is also given as input. Model summary is: ...
2
votes
1answer
264 views

How can I overfit a fully-connected neural network to predict RGB values from (x,y) coordinates?

The problem is the following: Given a single 3-channel image (e.g. 200x150), I constructed a dataset where the features are the pairs of (x,y) coordinates and the targets are the (R,G,B) values. Each {...
2
votes
0answers
104 views

LSTM - Learning a sinus function with linear part

I have recently build a simple LSTM-Network to predict a sinus function, which worked fine. Now I wanted to fit a sinus function containing a linear part with the same network but the results are ...
2
votes
2answers
155 views

How can I train my deep learning model on another similar yet different dataset

I am doing semantic segmentation (multi-class classification of image pixels) using convolutional neural networks (CNN) in Keras. In particular, I am applying this to aerial images of crops (...
2
votes
0answers
139 views

LSTM good at hallucinating, useless at ground truth prediction?

I was interested in this project, so I cloned it and trained it on Moby Dick, for this challenge. The goal is to predict the next character given the past ground-truth characters. Overfitting is not ...
2
votes
0answers
1k views

input image size for deep learinng models

i have two set of images. One of size 120*60 and other of size 1022*81. Most of the deep learning models require size 224*224 or some other standard dimension as an input. Can i put these images ...
2
votes
0answers
2k views

LSTM for stock prices and trends prediction

I have an assignment to create a LSTM network predicting price and trend of cryptocurrencies based on stock market data from the past. The network I am using is a multilayered LSTM, where layers are ...
2
votes
0answers
1k views

How to use Keras pre-trained 'Embedding' layer?

guys! I've trained model in keras using Embedding on specific corpus of articles. I use this tutorial http://adventuresinmachinelearning.com/word2vec-keras-tutorial/ Now I want use it as layer in my ...
2
votes
1answer
455 views

Convolutional neural network: why would training accuacy and well as validation accuracy fluctuate wildly?

I am training a convnet on a binary classification problem using medical images. I;m doing a preliminary evaluation of various shallow nets to get a sense of what the best hyperparameters are likely ...
2
votes
2answers
4k views

How to train a LSTM model for a next basket recommendation problem?

I try to use a LSTM model for a problem of next basket recommendation. I would like to apply the same approach as this article in Python using Keras : A Dynamic Recurrent Model for Next Basket ...
2
votes
0answers
363 views

Sequence classification of binary vector with keras

I'm trying to classify a vector of 0s and 1s of arbitrary length. For that I'm sliding a window over the vector and use the subvector as input for a deep neural network. I would now like to improve ...
2
votes
0answers
71 views

How can I improve this basic Classification model? Have I implemented it correctly and validated the data?

I'm a student that is new to this field, I've played with the GUI version of Weka and made Neural Nets in that with premade datasets but now is the first time I've implemented one using Keras (Theano ...
2
votes
0answers
675 views

LSTM for classification

I have a dataset which consists of $n_\text{samples}$ different measurements. Each measurement contains $n_\text{features}$ features. These features are for example ...
1
vote
0answers
23 views

How to make a custom activation function in keras with a learnable parameter?

The answer to this question is generally to implement it as a new layer and do layer = Dense(num_neurones)(previous_layer) out = TheActivationFunction()(layer) ...
1
vote
0answers
133 views

How to implement 1D Convolutional Autoencoder with multiple channels?

I want to build a 1D convolution autoencoder with 4 channels in Keras. Instead of images with RGB channels, I am working with triaxial sensor data + magnitude which calls for 4 channels. I haven't ...
1
vote
0answers
30 views

Neural Network to discover an unknown number of patterns from a dataset of images?

I have a big set of images (>10.000), where there are similarities among them. I need to find a number/group of image patterns (eg, 5) that represent all images. As I do not know what patterns are, ...
1
vote
0answers
64 views

Autoencoder on heat maps

I have time sequences of 2D heat maps. For different people I have heat maps over time. For each person I have around 720 heat maps and in total around 50'000 heat maps. Now, I would like to train ...
1
vote
1answer
33 views

training a nn with f1 as loss on keras doesn't work?

I have no problem to train my neural network with categorical_crossentropy as loss but when I do the same with f1, it just doesn't progress : Epoch 1/9 1029/1029 [==============================] - ...
1
vote
0answers
122 views

Why is accuracy very low and losses high and fluctuating for cnn-lstm

Below given is my cnn-lstm architecture. ...
1
vote
0answers
259 views

High loss (low accuracy) on validation set but not on external test set

I'm training a neural network using 70% of my data as training set, 20% as external test set and 10% for validation using Keras. When I evaluate the trained model the performance on the validation set ...
1
vote
0answers
120 views

Why not use (nested) cross-validation to update weights when building final model?

I have been trying to find an answer to this question for some time. I understand that cross-validation is primarily used for model selection, i.e. to tune parameters/hyperparameters, but I don’t ...
1
vote
0answers
50 views

Understanding Feed Forward Neural Network Output

I have build a feed forward neural network with 3 hidden layers for regression problem. The metrics I'm using for validation is MAPE. Following are the model parameters ...
1
vote
0answers
942 views

What is the difference between dice loss vs jaccard loss in semantic segmentation task?

What is the difference between dice loss vs jaccard loss in semantic segmentation task? Dice loss: ...
1
vote
0answers
487 views

loss function in CRF keras-contrib returns Nan in join mode

I use a BiLSTM-CRF architecture to assign some labels to a sequence of the sentences in a paper. We have 150 papers each of which contains 380 sentences and each sentence is represented by a double ...
1
vote
0answers
31 views

Using Keras NN to predict risk

Question What is the best activation to use for a keras NN predicting risk of a single binary outcome? Is it sigmoid? And are there some approaches I can use to ...
1
vote
0answers
49 views

A mistake in Tensorflow's documation?

Tensorflow's documentation gives an example for text generation using a RNN with eager execution. To the best of my understanding, this examples defines a simple RNN (with a GRU cell and a projection ...
1
vote
1answer
290 views

Neural networks to predict a nonlinear curve

I want to model a complex nonlinear function using neural networks (keras). Training data: input - 8500 x 176 matrix of features, output - 8500 x 8 matrix, each row corresponds to 8 points which ...
1
vote
1answer
27 views

Getting ValueError while implementing LSTM in keras

I am getting this error while implementing LSTM in Keras: """"Error when checking input: expected lstm_16_input to have 3 dimensions, but got array with shape (156060, 1)"""" I have 156060 text ...
1
vote
1answer
76 views

Clarifications regarding LSTM

...
1
vote
1answer
37 views

Which algorithm for classification problem?

I want to create a ML (DL) model, that predicts the success of Facebook page-posts, based on historical data. My dataset represents a couple thousands posts, labeled 1 (successful) and 0 (...
1
vote
0answers
271 views

How to implement custom loss function on keras for VAE

I have implemented a custom loss function. While training the model, I want this loss function to be calculated per batch. ...
1
vote
0answers
233 views

custom loss function to optimize payoff via binary decision

I have written a custom loss function that is supposed to optimize a payoff via a binary decision. However, the neural networks is struggling to convert, and I'm suspecting that there's something ...
1
vote
0answers
77 views

Neural network training: going backward to go forward?

I am working on CNN models which are intended to predict a protein's structure from its amino acid sequence. I have a decently large data set, 750 protein structures containing over 100,000 amino ...
1
vote
0answers
152 views

How can we know the encoding dimension in the autoencoder model?

I have a very basic autoencoder model. I am trying to train it on one hot encoded vector. ...
1
vote
0answers
420 views

Training of multiple time-series with different lengths

I have a lot of time series with different lengths. I would like to know what are the best practices to fit them to a Bidirectional LSTM model. The problem is a Binary Classification of Sequence to ...
1
vote
0answers
92 views

How to make normalize image classification output and improve the model?

I am trying to build an image classification using transfer learning of VGG16 model. I acquired very small data set of 200 images for each class and used 10 images as validation(I know the data set is ...
1
vote
0answers
24 views

Alternative to minimizing residual size in “learning” phase of ML?

I have a somewhat theoretical question regarding the "learning" in supervised regression problems. From my understanding, the "learning" in most ML algorithms contains creating a hypothesis, that ...
1
vote
1answer
326 views

How to frame a Time Series forecasting problem for LSTM Neural Networks?

I have a dataset of points along a wave whose cycles slowly grow in period over time. I have ~47 cycles worth of data. My goal is to forecast at least one whole cycle into the future (around 50 data ...
1
vote
0answers
59 views

How to use Tensorflow with an already existing Keras LSTM model

I want to perform a reinforcement learning experiment on top of an LSTM model. The LSTM model performs an entity recognition on four entities (Products, Person, Location and others). Now I want to ...
1
vote
1answer
125 views

Classify the main semantic relation of a sentence using keras

I tried to ask in SO, but they told me to ask here. I have a big dataset like this: ...