We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [keras]

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

164 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
60 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
127 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: ...
1
vote
0answers
641 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
1k 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
292 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
1answer
69 views

Is there a way to handle associative arrays in machine learning without casting to a fixed index?

I have a (very large) data set that I'd like to set up a categorization algorithm for. The data has the following form: ...
1
vote
0answers
53 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 ...
1
vote
1answer
679 views

Parameters Grid Search for Keras LSTM on Time Series

How do you do grid search for Keras LSTM on time series? I have seen various possible solutions, some recommend to do it manually with for loops, some say to use scikit-learn GridSearchCV. Feedback ...
0
votes
0answers
6 views

How can I visualize activations of a simple classification fully connected NN (built with Keras/TF)?

I want to see mean activations per class or activations for a single data point. Just like Google did it for their Playground: playground.tensorflow.org Maybe I am just not searching the webs with ...
0
votes
0answers
6 views

Weight scheduling for combining multiple losses in Keras

In a multiple output network built with Keras, I have two loss functions which are combined with loss_weights option. Now I need to set the dynamic weight where the value would increase from zero to ...
0
votes
0answers
9 views

Best Method to Find Embedding Similarity Between Array of Items to One Single Item

Say I have an array of items purchased together and I have different attributes of these products purchased together. ...
0
votes
0answers
18 views

batch-training LSTM with pretrained & out-of-vocabulary word embeddings in keras

My goal is to batch-train an RNN LSTM mode using Stochastic Gradient Descent to predict named entities from labeled text in keras. The input to my model are word-sized units. I chose to represent ...
0
votes
0answers
5 views

Neural network model with sequential autocorrelated data

I am working on a project where I try to predict variable length sequences of a target variable (y) with some explaining variables (x1..n). What I did was to flatten the sequences to build a 3 dense ...
0
votes
0answers
16 views

How to properly use batch normalization during inference

I am trying to manually implement calculations of the image classification process using pre-trained weights from the MobilenetV2 network. I know how to apply filter weights to channels, but do not ...
0
votes
0answers
6 views

Changing the the input shape in Keras for pre-trained model

I have a pre-trained Keras model which takes input shape of $(100,20)$. The system uses fully convolutional network with Conv1D and the subsequent processings are independent of the first dimension (...
0
votes
0answers
19 views

Setting seeds despite repeated training of CNNs?

I would like to compare the classification performance (like accuracy, precision, recall etc.) of different CNN architectures. I'm using Google Colab (GPU support), Tensorflow and Keras. Since it is ...
0
votes
0answers
7 views

Time Distributed Loss

I am currently working on implementing a time series prediction task that will produce labels across a sequence (batch, steps, features) -> (batch, steps, classes). I have a TimeDistributed layer as ...
0
votes
0answers
19 views

Loss function in Text Generation using word-level approach

I'm trying to solve a problem of sequence prediction, which is in similar in spirit to Text Generation. I've seen several tutorials addressing a word-level approach, such as this one, resulting in a ...
0
votes
0answers
19 views

How can a Keras convolutional network be defined such that it outputs images of the same dimensions as the input?

I wanna train a convolutional neural network to convert an input image to an output image, where the input and output images are of the same dimensions (50 pixels wide, 300 pixels high and greyscale). ...
0
votes
0answers
5 views

input_9 to have shape (10,) but got array with shape (2,) error when latent dimension of VAE is changed from 2 to 10 using keras

I am trying to change the latent dimension in the following code: https://www.kaggle.com/rvislaywade/visualizing-mnist-using-a-variational-autoencoder but when I run the last step I get an error ...
0
votes
0answers
14 views

What Keras models would be best for output of lists of word vectors?

Imagine a regression model that is to be trained on data consisting of questions and answers expressed in text. The questions and answers are converted to lists of word vectors using some good word ...
0
votes
0answers
23 views

Weight initialization in neural networks

Hi I am developing a neural network model using keras. code ...
0
votes
1answer
55 views

Normalization of data before NN batch-wise using batch normalization layer?

I am using a code I altered for sound event classification. The original code, first iterated through all training examples (large chunk), gathered the mean and standard deviation, then normalized all ...
0
votes
0answers
60 views

Mathematics behind single input, multiple output regression

I have sought some help and trained a regression model that takes in a single dependent variable Y and gives the three independent variable R, B and G as output. This has been done in attempt to ...
0
votes
2answers
75 views

Obtaining VAE reconstruction probability

How does one calculate the reconstruction probability? Let's look at the keras example code from here. Is the reconstruction probability the output of a specific layer, or is it to be calculated ...
0
votes
0answers
10 views

CNN Feature Extraction Time

I have a dataset consist of 260 thousands images that are extracted from several videos. I want to extract features of these images and use them for frame retrieval. I used VGG16 (pretrained on ...
0
votes
1answer
20 views

Reconstruction error drops for an anomaly?

I have a convolutional Autoencoder being used as an anomaly detector, it works well. Today however I trained it on a new training/test data set and the anomalies were exposed as a drop in ...
0
votes
0answers
8 views

Can a neural network independently change its learning parameters while the error between what was predicted and what was not the most minimal in R

I performed script which create forecast of usd/btc pair. Data was taken form open source https://www.cryptodatadownload.com/apac/ https://www.cryptodatadownload.com/cdd/Binance_BTCUSDT_1h.csv Here ...
0
votes
0answers
31 views

Using both batches and buckets in neural network

I think I understand what batches serve for in neural network training, especially after reading this question. It has also clear correspondence in libraries like Keras: ...
0
votes
0answers
37 views

Deep Learning for small 1-dim Datasets

I am trying to find a neural network architecture for a dataset (150 instances) with 10 features (numerical). The features are not associated to each other, so 1d-convolutions are not an option. ...
0
votes
0answers
11 views

Loss magnitude showing 0 at first epoch yet predictions are completely off

I'm trying neural network for the first time. I'm getting a weird output - while loss magnitude is apporaching 0 at the first epoch itself, the predictions are trash! can some one explain what's going ...
0
votes
1answer
19 views

Increasing sample size increases no of trainable parameters

I was working with keras and tensorflow as backend on an NLP problem when I observed that increasing my training data size caused an increase in the number of trainable parameters even when batch size ...
0
votes
0answers
14 views

How can I iterate on the hidden activations in a neural network? - Lifetime and spatial sparsity in WTA Autoencoders

I've built a convolutional autoencoder and trained it on MNIST in keras and tensorflow. I wanted to make this autoencoder a WTA autoencoder as talked about in this paper. To do so, I need to add ...
0
votes
0answers
42 views

MNIST with Tensorflow and Keras, same architecture but less accurate in Tensorflow

I implemented a neural network in Keras and Tensorflow to make predictions on the MNIST dataset. I used the same architecture for both Keras and Tensorflow. While the code in Keras gives me always an ...
0
votes
0answers
25 views

Does it make a difference in LSTM as to how I give the input?

So, as we know the input of the LSTM is always is a 3D array: batch_size, time_steps, seq_len. So, does it make a difference if I give input of the LSTM as: ...
0
votes
1answer
57 views

LSTM Capacity: Many-to-Many vs. Many-to-One

Existing research documents LSTMs to perform poorly with timesteps > 1000 - i.e., inability to "remember" longer sequences. What's absent explicit mention is ...
0
votes
0answers
25 views

How can I interpret the result of get_weight of latent size in Seq2Seq model keras

My question is related to Seq2Seq models where we have LSTM as encoder and decoder. Imagine we have the Autoencoder alone, and we extract the weight associated ...
0
votes
1answer
23 views

Validation accuracy/loss goes up and down linearly with every consecutive epoch

I'm training a CNN in keras with tensorflow backend with the following model architecture for a binary classification problem. I've divided approximately 41k images into training, validation and test ...
0
votes
0answers
13 views

Passing specific achors to YoLo training process

We are trying to improve our YoLo algorithm results of recognizing one class of varying sizes (~ varying distance to the camera). Luckily, the a priori position of the object is known with a certain ...
0
votes
1answer
16 views

Class Imbalence Problem even after Balancing Data

So I am training a neural network on a binary classification problem and my Case (1) and Controls (0) were imbalanced so I oversampled my cases so that that the training set was 0.5053 made up of ...
0
votes
0answers
24 views

Why are my neural network predictions so wrong when I add another variable

I have created a neural network in order to predict the following hours electrical demand depending on the previous sixty observations. However I know that temperature affects the load at a given hour ...
0
votes
0answers
52 views

Is it normal to have big difference between train loss and test loss on neural networks when using class weights

I am training a simple feed forward neural network in Keras, to perform binary classification. Dataset is unbalanced, with 10% of class 0 and 90% of class 1, so I was adding a class_weight parameter ...
0
votes
1answer
95 views

Trying to predict continuation of curves using LSTM

I have an application where I get a large set of smooth curves (2D). Those curves are represented by sample points on that curve. Sometimes, those curves cross or get close to each other and it is not ...
0
votes
0answers
86 views

BiLSTMs with Attention model for Multi-Label Multi-Class Classification

I am trying the modify the BiLSTM with Attention model he used in Course 5 Neural Machine Translation for predicting grades (ranging from O,A+,A,B+,B,C,D,E,F) for multiple subject (approx 9 subjects ) ...
0
votes
1answer
58 views

How to handle timeseries extremes (sigma > 20) in deep learning?

I'm using 16-channel, 400-Hz, standardized EEG data to train CNN-LSTM for seizure classification. The data contains $O(3)$ sigma > 20 points, rarely thousands in a ...
0
votes
0answers
47 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
22 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
76 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 ...