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.

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
5 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 ...
-1
votes
0answers
2 views

need auc scoring with gridsearch in keras

I have unbalance dataset , i need to implement auc scoring in keras with gridsearch cv to find the best score. But in keras classifier auc and other metrics cannot be used directly , can anyone help ...
0
votes
1answer
10 views

How Do I get 0 and 1 For multiclass multilabel problem in Keras prediction?

Let's say I have 3 classes, and each sample can belong to any of those classes. [ [1 0 0] [0 1 0] [0 0 1] [1 1 0] [1 0 1] [0 1 1] [1 1 1] ] I set my output ...
0
votes
0answers
14 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
1answer
17 views

How can I store information in a custom regularizer? [on hold]

I'm trying to create a custom keras regularizer that uses the distance of the layer's weights from it's original weights, but what I used doesn't seem to work. I get a zero difference at all times. ...
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 ...
4
votes
1answer
702 views

Keras difference between GRU and GRUCell

In Keras documentation at this page, https://keras.io/layers/recurrent/, I wonder what's the difference between GRU and GRUCell, which one I should use if I'd like to create a GRU recurrent network. ...
4
votes
1answer
682 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-...
1
vote
2answers
755 views

How to extract the features making up the hidden layers in Autoencoders

Apologies if this question has been asked before but I haven't come across any so far. I have been experimenting with Autoencoders using Keras and Theano as my back end based on the tutorial from ...
0
votes
1answer
54 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
1answer
2k views

Keras - text classification, overfitting, and how to improve my model?

i am developing a text classification neural network based on this two articles - https://github.com/jiegzhan/multi-class-text-classification-cnn-rnn https://machinelearningmastery.com/sequence-...
7
votes
3answers
13k views

Simple Linear Regression in Keras

After looking at This question: Trying to Emulate Linear Regression using Keras, I've tried to roll my own example, just for study purposes and to develop my intuition. I downloaded a simple dataset ...
0
votes
0answers
16 views

Training slower on better GPU [closed]

I'm training an LSTM (2 LSTM layers + 1 fully-connected layer) with Keras (with Tensorflow backend) on two different machines using a single GPU per machine. Surprisingly I obtain slower training on ...
0
votes
1answer
30 views

Poor performance of LSTM classifier, almost always predicts one single class [closed]

I'm currently doing a multiclass problem, with 38 input variables and a 4 one-hot encoded vector as output. I've gathered a total of 8 time series with a grand total of 23977 rows. While my model ...
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

Autoencoder keeping constant vector as predict in keras [duplicate]

I'm new in keras and deep learning field. In fact, I want to make a dense vector for each document in my data so that i built a simple autoencoder using keras library. The input data are normalized ...
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
1answer
18 views

Binary Classification of Numeric Sequences with Keras and LSTMs [duplicate]

I'm attempting to use a sequence of numbers (of fixed length) in order to predict a binary output (either 1 or 0) using Keras and a recurrent neural network. Each training example/sequence has 10 ...
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 ...
1
vote
1answer
178 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 ...
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 ...
153
votes
4answers
207k views

What is batch size in neural network?

I'm using Python Keras package for neural network. This is the link. Is batch_size equals to number of test samples? From ...
2
votes
1answer
634 views

Cross Validation with Autoencoders in R on MNIST dataset [closed]

I was following this python guide and trying to emulate it in R: https://machinelearningmastery.com/evaluate-performance-deep-learning-models-keras/ there is this function called stratifiedKFold in ...
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
1answer
15 views

How could I go about implementing k-fold cross validation giving my circumstance?

The way I understand k-fold cross validation is that a given dataset or a training subset of the dataset is divided into k equal sets called folds. Then the training should be performed iteratively ...
1
vote
1answer
29 views

Help me interpret my VGG16 fine-tuning results

I have a binary classification problem where I'm trying to classify whether a given cell is cancerous or not. For this I decided to play around with VGG16 pre-trained model and simply remove the last ...
0
votes
0answers
14 views

NER with GRUs neural network with imbalance dataset

this is my first time asking question on CrossValidated, so if there is any mistake on my part, i apologize. I will try not to make those mistakes again. I'm trying to do a NER task. The problem is ...
0
votes
0answers
27 views

train_accuracy and train_loss are not consistent in binary classification [duplicate]

I am training a binary classification algorithm in Keras, the loss is cross-entropy ...
54
votes
2answers
31k views

How does Keras 'Embedding' layer work?

Need to understand the working of 'Embedding' layer in Keras library. I execute the following code in Python ...
1
vote
1answer
65 views

LSTM - Multiple Time Series, degrading accuracy

I'm trying to make a LSTM model for detecting failures on a physical system, by supplying 27 features of sensor data. I've inputted three disjunct timeseries, each beginning with "normal" operational ...
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 ...
0
votes
1answer
56 views

why the accuracy of my CNN decreasing after some epochs?

at high accuracy, after some epochs the accuracy as well as validation accuracy is decreasing and got stuck after few more epochs. i dont understand why this happened. does more epochs at some point ...
3
votes
2answers
13k views

How to use pre trained word2vec model?

Where can I find a reliable word2vec model trained on some English articles? I need a word2vec black box, where I, for example, ...
2
votes
0answers
33 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. ...
0
votes
0answers
11 views

Why does the DCGAN output degrade with an increase in the kernel size?

Thank you for the explanation on the kernel size. I have been experimenting with the sample Generative Adversarial Network (GAN) code from the book on Deep learning with Python by François Chollet, ...
0
votes
0answers
12 views

faulty autoencoder [duplicate]

I am developing an autoencoder for CIFA10 dataset, without adding noise at the input (which is 2nd goal). The Convnet based autoencoder is not converging: Any suggestions ...
0
votes
0answers
23 views

Neuronal Network to approximate function from training samples [duplicate]

I'm trying to implement a neuronal network that approximates a certain function, although the term "function" here is mathematically probably imprecise and wrong. Anyway, here's the idea. I have a ...
0
votes
1answer
29 views

choosing metric for R keras for imbalanced binary class

i am using Keras on a text classification task in RStudio. I have a very imbalanced binary classification problem where the positive class is only present in about 2% of cases. If i use down-...
0
votes
1answer
66 views

how does Keras ImageDataGenerator standardize data?

If I understand correctly the ImageDataGenerator class is a generator and returns batches of images when called, but what I don't seem to understand is: featurewise_center ...
0
votes
0answers
40 views

Multiclass Segmentation Using U-Net: My training loss is not decreasing after certain epoch (accuracy not increasing) [duplicate]

So the problem is to perform a multiclass segmentation (255 classes of crops), and I am using a U-Net model for that. The input images are grayscale and the images of dimensions (128,128,1) are ...
1
vote
0answers
23 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
1answer
28 views

how to build multiple independent binary logistic regression classifiers?

I have to build a logistic regression classifier to predict $\mathbf{y}$ given $\mathbf{x}$ where $\mathbf{x} \in \Re^{n}$ is an image and $\mathbf{y} \in \Re^{m}$ is a binary attribute vector (of $m$ ...
1
vote
0answers
23 views

How to plot the gradient descent of a RNN model built using keras? [closed]

I'm exploring how an LSTM solves the problem of vanishing gradients. I have created a simple LSTM model on keras. I know that model.fit() returns a history object that stores model loss and accuracy ...
0
votes
0answers
27 views

Machine Learning: Model doesn´t recognize letters but has 80% accuracy

I have build a model to classify numbers and characters on Images. I trained it on the Chars74K dataset and in training it has 80% validation accuracy. I just use the number and uppercase characters ...
2
votes
1answer
42 views

Creating a neural network that can make a decision with optional arguments

I'm a final year computer science student and for my final year project I have to design a neural network to play a little known board game called 'The Downfall of Pompeii'. I have to use ...
1
vote
2answers
443 views

Class Weight doesn't solve imbalanced dataset problem

I'm training convolutional neural network on imbalanced dataset, which has 9 classes. Number of classes in order is, 3000-500-500- ..... goes like this. Of course I'm not waiting %100 accuracy, but ...
1
vote
2answers
5k views

How to improve accuracy of my neural network?

I am working on a project in which I am using this dataset, I implement neural network by using keras for it but I am not getting testing accuracy more than 80%. Here is the details: Number of ...