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.

3
votes
0answers
21 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
466 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
146 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
34 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
60 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
229 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-...
2
votes
0answers
136 views

Training a bidirectional LSTM is unstable

I'm trying to solve timeseries classification problem. That's my model: ...
2
votes
0answers
93 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
121 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
961 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
327 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
656 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
27 views
1
vote
0answers
25 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
79 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
57 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
34 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
339 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
228 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
47 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
195 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
175 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-...
1
vote
0answers
191 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
66 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
109 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
327 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
87 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
290 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
23 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
54 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
489 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
901 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
266 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
49 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
10 views

Understanding epoch, batch size, accuracy ,performance gain in lstm forecasting model

I am new to machine learning and lstm. I am referring this link LSTM for multistep forecasting for Encoder-Decoder LSTM Model With Multivariate Input section. Here ...
0
votes
0answers
6 views

Finding correlations between multiple labels in neural networks

I am just posting with reference to another thread I read and would appreciate if anybody could offer some help. I am training a multi-label, multi class classifier in keras where my data has multiple ...
0
votes
0answers
15 views

Matrix formation and calculation for Collaborative filtering in Neural Network

Intution I am trying to implement Collaborative Filtering (User Based and Item Based) in Python Keras with neural networks. For user based CF with neural network, my input is rating matrix with ...
0
votes
0answers
6 views

Why do cross_val_score() and fit() return the last value, and not the best?

When you fit() a model, in let's say Keras, over a large number of epochs, chances are overfitting will occur. When supplied with a validation-set, you can easily find the point where the validation ...
0
votes
0answers
13 views

Different metrics for GridSearch and Keras: which one is actually returned

During GridSearchCV/RandomizedSearchCV we have different options to use for scoring, 'accuracy' being the most popular. However, in the case of unbalanced classes, such metrics as "f1_macro" are more ...
0
votes
0answers
10 views

How to make a sequence element-wise clustering with a RNN (preferable in Keras)

Non-Keras contributions are also welcome since the question is very concrete already. Imagine I have a sequence $S_i = s_0, s_1, ..., s_n$, where $s_k$ is the k-th element that represents an element ...
0
votes
0answers
5 views

Autoencoder - reconstructed image not matching the input image

I have trained a convolutional autoencoder on cifar10 dataset. The reconstruction loss on the test data is quite less (around 0.0225). However, the reconstructed training images do not look like ...
0
votes
0answers
9 views

Handle loss while converting high dimensional image to specific size in VGG 16

I am training a VGG16 net using transfer learning. I have removed the fully connected layers and used fine tuning to classify objects into few categories but I have faced below problems: 1.I have ...
0
votes
0answers
7 views

does feature normalization with Keras solves the color balance and illumination imbalance problem?

Keras ImageDataGenerator allows feature normalization as below: ImageDataGenerator(featurewise_center= True,featurewise_std_normalization=True) I am working with ...
0
votes
0answers
18 views

Incorporating multiple categories to understand relationships between them in a sequential model

I have successfully built a a sequential model to stratify different organs of some genomic data that I have, and this works really well and with a high accuracy too. However, this is also time series ...