Questions tagged [keras]
Open source high-level neural network library for Python and R. Is capable of using TensorFlow or Theano as backend.
678
questions
1
vote
0
answers
16
views
why does epoch sometimes not stop at the set patience?
I'm confused as to how 'patience' works on keras. as far as I know, if we set patience=10 then if in the last 10 epoch the loss doesn't decrease significantly or even continues to increase, then the ...
0
votes
1
answer
42
views
Is it ok to have low validation loss from the first epoch?
I'm trying to implement Neural Collaborative Filtering recommender system using Keras, the dataset I'm using is movielens-small. Whatever I do to hyperparameters or network, when training, the ...
2
votes
2
answers
41
views
Binary input variables for a Keras Neural Network
I have a set of forty predictors each of which are binary. I’m using elastic net logistic regression in addition to a random forest
Is there any reason why you could not use binary inputs for a Keras ...
0
votes
0
answers
15
views
Why are my deep learning models giving unreasonably high accuracy on test data?
I'm trying to do sarcasm detection on Twitter data to replicate the results mentioned in this paper. Binary classification problem. For that I used a separate set of unlabeled tweets to create the ...
0
votes
0
answers
59
views
Managing Missing Values in LSTM Time-Series Model using Keras Masking Layer
I am currently working on developing an LSTM model using six time-series data as an input with the objective to predict one of them. However, the data contains missing values that need to be addressed....
0
votes
1
answer
37
views
RNN/LSTM networks on spectrograms underfitting massively - is the CNN encoder a prerequisite?
I am prototyping a pipeline on the FSDD dataset (audio/10-class classification); the audio data are loaded with librosa, 0-padded/trimmed to 0.5 sec (4000-dimensioned numpy vectors) each and converted ...
0
votes
1
answer
156
views
How to calculate the decay rate given an initial learning rate and final learning rate for schedulers when training neural networks?
I am training a neural network in TensorFlow and I would like to use firstly an exponential decay optimizer scheduler (https://www.tensorflow.org/api_docs/python/tf/keras/optimizers/schedules/...
0
votes
0
answers
9
views
Handling Molecular Graphs and Numeric Data in Parallel
I haven't been able to find much material on it so I am not sure if I'm couching my problem in the right words. I'm using deepchem with keras and rdkit. Essentially I have some molecular data and I ...
0
votes
0
answers
23
views
Running SVM on positional embeddings using keras for text classification
How can I run SVM on a large text classification dataset for detecting fake news of 400 thousand entries that uses positional encoding for embeddings from keras and has a maximum sentence length of 15 ...
0
votes
0
answers
19
views
Prediction model for [parameter vector] to [time series]
Say I have a function $F$ that takes in a parameter vector $P$ (say, a 5-element vector), and produces a (numerical) time series $Y[t]$ of length $T$ (eg $T$=100, so $t=1,...,100$). The function could ...
0
votes
0
answers
164
views
F1 score for validation and testing datasets is different
I have the following F1 score function that I use for the model when I train it as part of metrics and as well during prediction:
...
1
vote
0
answers
23
views
Much better results when standardizing features to train LSTMs
I have a data set of time series. Each time series represents trajectories of the same path taken. So, the time series captures acceleration in $x$, $y$ and $z$ direction, respectively for the ...
1
vote
1
answer
248
views
How to generate new data with a VAE?
I have built the following function which takes as input some data and runs a VAE on them:
...
0
votes
1
answer
390
views
Single input - multiple outputs with different loss functions in Keras: how is the gradient computed?
I've implemented a neural network with single input - multiple outputs using Keras API. The general structure of the network is like in this figure:
Because each branch does a different task, I ...
0
votes
0
answers
26
views
Recurrent dropout in keras: is the Semeniuta method equivalent to the Gal and Ghahramani method from the point of view of variational inference?
as the title. from this post https://stackoverflow.com/questions/44924690/keras-the-difference-between-lstm-dropout-and-lstm-recurrent-dropout I have recently learned that the implementation of ...
0
votes
0
answers
58
views
Grid search with KFold CV and Early Stopping - which validation set?
I'm training a NN to solve a regression task.
I want to perform a grid search with Kfold combined with early stopping, but the only way I found is by passing a new validation set (different from the ...
4
votes
1
answer
509
views
How to determine if two images contain the same object without a dataset?
The problem I am trying to solve is, given two images, determining whether they contain the same object or not. Here is an example:
The first two images contain the same object, while the third image ...
0
votes
0
answers
47
views
Predict angle by linear loss
I'm trying to solve following nonlinear regression task: We got fixed point from which the bullet is released with some start speed v0 (value v0 changes each time). On the opposite side we generate ...
-1
votes
1
answer
201
views
Scikit-learn and Keras' MLP very different with same hyperparameters
I'm using Multilayer Perceptron ANNs at the very beginning of my project (it's a binary classification problem). Because it's simpler, I started with Scikit-learn. I got a magic result, with my model ...
1
vote
2
answers
382
views
Why does a neural network trained with random data and fixed initialization have different weights between runs?
I wrote a simple code that creates a neural network with two dense layers and then trains it. In this code, the initial coefficients of each layer are fixed. Why do the answers change every time? (In ...
0
votes
0
answers
55
views
Why am I obtaining values close to zero when using a NN for regression? [duplicate]
Here is the dataset.
I tried converting this implementation into its analog with Keras. Why are my predictions SO bad? They are almost always close to a single number. Doesn't matter if I use more ...
0
votes
0
answers
13
views
Imbalanced binary classification results discussion
Hello I'm wondering how do you consider these result For binary classification with class imbalance.(84% to 16).
Accuracy 96 Precision 94 Recall 80 F1 86 Roc_auc 98
0
votes
0
answers
29
views
Return_state in LSTM Keras
Using Return_state = True, we return the last hidden state twice and the last cell state. My question is why the last hidden state is returned twice. Why is that needed and in which application?
0
votes
0
answers
189
views
Multilabel Classification: Accuracy is very low. Metric or Model, which is inadequate?
In my multilabel classifaction problem, which I approach similarly to what can be see in this post: How does Keras handle multilabel classification?, the resulting accuracy only increases from 2% to 5%...
1
vote
1
answer
71
views
Keras Prediction one step beyond
I am trying to make time series forecasting with keras. Has any one observe the phenomenon where the model can predict the next value after the current (the one that should predict)?
If in fact I move ...
1
vote
1
answer
122
views
Loss Function for Binary Classification with Multiple Correct Choices
I have a binary classification problem, where there are multiple correct predictions, however, I would consider the prediction to be correct if the highest confidence prediction of a 1 is correct.
I ...
1
vote
0
answers
161
views
Is it possible to do feature selection within the Keras deep learning framework? [closed]
I know most people perform feature selection running RFE on a linear regression model, for example, BEFORE training the model with Keras.
However is it possible to do it within the training procedure ...
1
vote
0
answers
32
views
What are the differences between AdaDelta and RMS prop in Keras (if any)? [duplicate]
I have read many references which suggest that RMSprop and Adadelta are basically same, just developed independently. However, Keras has two different classes for it. Also, it allows RMS prop to have ...
0
votes
0
answers
11
views
how to determine epochs value, momentum and learning rate? [duplicate]
I have dataset with 70k-90k rows 42 columns and one of them is my target variable with 3 class label (yes, no , not applied). I'm applying sequential model (MLP) to my data, I just used random values ...
0
votes
1
answer
80
views
Understanding keras layer structure/notation
I am trying to understand the following keras model:
...
0
votes
0
answers
78
views
Recommender System: How to predict user ratings using Linear Regression and User/Item Embeddings?
I hope this is the right forum for this, but here goes:
I am currently doing a capstone project for a course. Part of that is building a recommender system using various algorithms such as NMF, kNN, ...
0
votes
0
answers
14
views
Predicting multiple items with different customer behavior using neural network
I'm working on neural network model to predict the number of products to order during promotion period.
My question is that, if I have multiple items with different user behavior e.g.
fresh milk (...
0
votes
0
answers
34
views
How can reduce improve my ANN accuracy and reduce overfitting?
My ANN model produces classic overfitting characteristics, producing high R2 values (90-99%) but low accuracy scores (10-40%). I'm currently inputting 28655 data entries, using 8 input features to ...
0
votes
1
answer
40
views
Learning stochastic pattern using RNN
I have a pattern of count time series of vehicle demand as shown below.The time series is generated as follows:
Categorical Random Variable, x = {0,1,2} and p(x) = {0.6,0.3,0.1}
low vehicles = 1 + x , ...
0
votes
0
answers
297
views
High validation accuracy and training accuracy but low test accuracy
I have a LSTM model that has good training accuracy(~90%) and excellent validation accuracy(> 95%) but it gives poor results when I test it on data it hasn't seen. I am training hyperparameters ...
3
votes
1
answer
101
views
Best hyperparameter is not consistent among different seeds
I do hyper-parameter tuning on my network and it outperforms the simple classifier. The difference in classification is considerable after hyper-parameter tuning. But, the problem is that an optimal ...
3
votes
2
answers
1k
views
Using "X_test, y_test" as validation data on Keras
I was looking at some examples on how to use Keras for Regression and I came acrossed some tutorials that used X_test and y_test as validation data and then use them again at .predict.
...
1
vote
1
answer
324
views
Sequential Binary Imbalanced data classification with LSTM
I'm building an LSTM sequential Binary Classification Model, the data is highly imbalanced like say Fraud detection case.
After building an LSTM model on Sequential Vectorised data, I'm getting a very ...
0
votes
0
answers
49
views
Validation performance is really problematic; should I give up on increasing the validation performance of my deep learning model? [duplicate]
I am working on a multiclassification problem using time series data. Three datasets are utilized in this study. My deep neural network performs satisfactorily across two different data sets. However, ...
0
votes
0
answers
26
views
In what terms, training steps of my DG-GAN differs from the one of others?
Why does Deep Convolutional Neural Network GAN, trained using my step sequence, doesn't performs well as in the GFG DC-GAN Tutorial example? Even tho my code is similar in logic and resembles same to ...
0
votes
0
answers
47
views
Neural network loss not dropping to expected levels
I am attempting to create a neural network that can learn to evaluate chess positions. I'm following along with this paper and trying to recreate its results. The general idea is to have the NN ...
0
votes
0
answers
736
views
Proper masking in MultiHeadAttention layer in Keras
I am new to Transformers and I am trying to create a very simple model (not NLP area) for processing data of variable length (not sequence data because for my problem order in data does not matter). ...
3
votes
1
answer
258
views
To understand the underlying math of GRU neural network in TensorFlow Keras
I tried out a simple GRU network with only 1 layer, 1 input tensor and 1 output, to verify its actual network connection (input nodes->hidden layer->output) by doing the manual calculation with ...
1
vote
1
answer
547
views
Training loss after last epoch differs from training loss (same data!) during evaluation
I am building a deep convolutional model with a custom loss function. As a first step, I am trying to bring training loss down as far as possible to see if my model can overfit.
Training with on only ...
0
votes
0
answers
33
views
Need Help for reward function in reinforcement learning
I've created a RL to trade on an artificial custom financial asset(Complete Code). This is my Dataframe(enviroment) made of 'Close' price and 'Volume':
...
1
vote
1
answer
1k
views
Interconnections between embeddings layer and LSTM layer
I'm trying to build a text classifier with keras using word embeddings (glove) and a RNN (in this case a LSTM) using keras. I searched in several sites and decided to start with this configuration:
<...
0
votes
0
answers
12
views
amount of parameters of Conv1D vs Conv2D (Keras library) [duplicate]
imo, I should have the same amount of parameters if I construct Conv1D and Conv2D whereby in Conv2D one dimension is set to 1 (as if it was eliminated)
here are snippets from the summary function of ...
0
votes
0
answers
93
views
validation accuracy spikes on Unet Neural network
I'm a computer science student actually working on my graduation thesys based on a Unet ANN.I'm using Kolektor Surface-Defect Dataset 2 (i'll leave the link below) that is a dataset of annotated ...
0
votes
0
answers
130
views
is it good to have 100% accuracy on validation?
i'm still new in machine learning. currently i'm creating an anomaly detection for flight data. it is a multivariate time series data that include timestamp, latitude, longitude, velocity and altitude ...
2
votes
1
answer
633
views
Correct loss function and metric for regression of count data in neural network
I am using a convolutional neural network to predict the number of occurrences of a certain pattern in time series data. Since there might be potentially any count of such patterns in a time series, I ...