Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [keras]

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

4
votes
0answers
299 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-...
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
35 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
0answers
147 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
45 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
68 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 ...
2
votes
0answers
209 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
144 views

Training a bidirectional LSTM is unstable

I'm trying to solve timeseries classification problem. That's my model: ...
2
votes
0answers
95 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
0answers
126 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
0answers
340 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
667 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
58 views
1
vote
0answers
105 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
93 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
69 views

Fitting a neural network with more parameters than observations

I'm training a neural network for regression using keras with about 13k training observations, each with 40 features. It's a Sequential model with Dense layers. I generate random architectures for ...
1
vote
0answers
41 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
537 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
312 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
28 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
48 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
0answers
226 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
205 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
69 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
121 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
356 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
733 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: ...
1
vote
0answers
88 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
305 views

Activation Maximization Visualization for Resnet

I'm currently experimenting with Resnets and I'd like to visualize the convolutional layers for that. I came across this Keras Blog to perform an activation maximization of the convolutional layers: ...
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
0answers
15 views

Output trained parameters of Keras model

If I am training on a GRU model, is there a way I can output the learnt parameters so that when I train next time with more data, I can initialize with those learnt parameters as a starting point?
1
vote
0answers
55 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
0answers
522 views

Pearson Correlation for batches of labels and predictions (Keras)

I want to implement a custom metric (pearson correlation) as defined here in Keras. I get a batch (32) of predictions and labels. I use a neural network to predict 10 values. So my input is 32x10 ...
1
vote
0answers
933 views

Adding weather forecast to RNN LSTM Keras for time series prediction

[worked on it for the last month] Assumptions: predicted value (demand for heat in a district heating system)(*) depends on: -weather -hour of the day -day of the week -past pattern (of the ...
1
vote
0answers
1k views

Combining a Keras classifier with an XGBoost classifier to achieve better F1 Score

I've been working on a particular binary classification problem for some time now, and have discovered the two best classifiers among many models to be a Keras Conv1D net and a XGBoost model. As it ...
1
vote
0answers
279 views

Don't manage to decrease the loss function

I have been working in a text generator with LSTM cells inspired by this code http://machinelearningmastery.com/text-generation-lstm-recurrent-neural-networks-python-keras/ (I am adding words one-hot ...
1
vote
0answers
50 views

how to make a 2d plot of where different CNN predictions lie

Current model is a trained VGG19 model in Keras on 10 categories. I want to see where different image categories lie in a 2d plane (to see whether images of the same class are being clustered and how ...
0
votes
0answers
12 views

How can Keras Conv1D towers be concatenated in an inception module?

Word up. I have data of 18 features and 2 classes. I've got a working convolutional network for this data and it works just fine. It's like this: ...
0
votes
0answers
6 views

Maximize ELBO in Keras

When we train a Variational Autoencoder we say that we want to maximize the ELBO. However, from the Keras documentation, it seems that we are actually minimizing the ELBO: ...
0
votes
0answers
43 views

How exactly keras LSTM layer works?

I try to create a sentiment analysis that have 7 classification. Let's say, I have 100.000 unique word (already converted into 100.000 integer) which have the longest input is 41. I created 3 layer ...
0
votes
0answers
12 views

What type of accuracy should I reported in research paper?

I have read some research papers on the classification task of deep learning, and now I am doing my own. After investigating some research paper which also provided the source code for reproducing ...
0
votes
0answers
17 views

High accuracy on both training and validation but very low on test set

My CNN model has about 96~97% accuracy on both training and validation sets. But when submitting the test set it got only 24% accuracy. Here's my model: ...
0
votes
0answers
29 views

Keras GridSearchCV: Train and Validation Accuracy high but low test accuracy? (SOLVED, BUT WITH A NEW DOUBT IN CV) )

CODE SNIPPET Binary classification problem where train_data : N X H X W X F train_labels: N X 1 ...
0
votes
0answers
13 views

Using variable dropout in Keras

I need to implement a system with variable dropout factor in Keras with TensorFlow as backend. The dropout factor should change for each batch so that the the dropout factor varies from 0.0 to 0.20 at ...
0
votes
0answers
13 views

How do I implement masking in TensorFlow eager?

I am training a stateful RNN on variable length sequences (optional: see my previous question for more details). I padded the sequences to a fixed length with the value -1. The when batches are ...
0
votes
0answers
6 views

what is the difference between sklearn's train_test_split and keras load_data()?

im experimenting on autokeras, while doing so i came across something like (x_train, y_train), (x_test, y_test) = mnist.load_data(), is this different from sklearn.model_selection....