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
13 views

The kernel appears to have died. It will restart automatically. (Using fastai) [on hold]

I'm following this code. And everything works fine until this part of the code: ...
2
votes
0answers
19 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
22 views

why the accuracy of my CNN decresing 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 ...
0
votes
0answers
5 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
10 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
21 views

Neuronal Network to approximate function from training samples

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
13 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-...
1
vote
0answers
10 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 ...
0
votes
0answers
32 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 ...
0
votes
0answers
14 views

Text generation without being Language dependent [on hold]

Is there a way in which I can generate the text descriptions for products without bothering about the natural language. For example, if I want to describe a product in German, so can I train my model ...
1
vote
1answer
23 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
18 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
33 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 ...
0
votes
0answers
5 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
1answer
17 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
11 views

Dropdown in Validation Loss in the first epochs

I've built a classical backpropagation ANN using Keras for a regression problem, which has two hidden layers with a low amount of neurons (max. 8 per layer). The amount of samples for training and ...
0
votes
1answer
26 views

Feed Forward Neural Network Time Series Regression

I'm trying to use the Tensorflow regression tutorial (with Keras) to do some regression on a time series with a couple of inputs. I will provide code if asked so. My inputs are: [Day, Hour, Minute, ...
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 ...
0
votes
0answers
18 views

Weighted binary crossentropy in U-Net has no effect on accuracy (dice coefficient)

I am currently working on implementing a weighted binary crossentropy loss function as described in the U-Net paper ...
0
votes
1answer
17 views

How to predict similarity of unseen data to the training set?

I have a time series of human pose data which are recorded from real humans. I want to train the model with unsupervised learning on the training data. Let's call this the "real" training data. The ...
0
votes
0answers
22 views

my CNN predict all 0 or all 1 in multi label classification problem

I am trying to build a CNN for classifying multiple objects in images. I'm on keras and I use the COCO dataset. my net takes in input a 256x256 image and outputs the vector of the predictions of each ...
0
votes
0answers
46 views

Why would one use gradient boosting over neural networks?

I'm referring to a specific Kaggle set: https://www.kaggle.com/c/petfinder-adoption-prediction There are a lot of columns, and I'm (for now) ignoring the images / videos. I'm training a standard ...
0
votes
0answers
18 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 ...
1
vote
0answers
74 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 ...
0
votes
0answers
23 views

Is it possible to create LSTM with attention mechanism for many-to-one problems?

I'm interested in numerical inputs (scalars) and output (scalar) in particular and would greatly appreciate a Python implementation (PyTorch preferably). The topic I'm looking at is a time series ...
0
votes
1answer
32 views

High AUC and Accuracy but weird output in confusion matrix

I am working on image classification problem to determine gender given a face. The dataset is located here gender face dataset on kaggle (link to my notebook). The class distribution is as follows. <...
1
vote
1answer
44 views

Higher value of strides in conv1d

I am using Conv1d for time-series data and I have create a model as follows, ...
1
vote
0answers
56 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 ...
0
votes
0answers
56 views

Time-series classification of Kinect data using Keras

For my PhD project I recorded using Kinect and Myo 11 people performing Cardiopulmonary Resuscitation (CPR), repeatedly doing chest compressions to a manikin (one person per time). I collected in ...
0
votes
0answers
11 views

GridSearchCV with one-hot y: prediction yields 1-dim array

I run a classification by means of a neural network, thus my y-values are converted to a one-hot matrix: ...
0
votes
1answer
86 views

Python / Keras: SMOTE and validation_split

I try to train a MLP with an imbalanced dataset. I'd like to use SMOTE to balance my classes; as highlighted here (https://beckernick.github.io/oversampling-modeling/), the class rebalancing should ...
2
votes
1answer
79 views

Where to include Dropout in stacked autoencoder

I'm using Keras to implement a stacked autoencoder, and I think it may be overfitting. I wanted to include dropout, and keep reading about the use of dropout in autoencoders, but I cannot find any ...
2
votes
1answer
47 views

Keras LSTM Long Term Dependencies

I am familiar with the LSTM unit (memory cell, forget gate, output gate etc) however I am struggling to see how this links to the LSTM implementation in Keras. In Keras the input data structure for X ...
0
votes
0answers
27 views

Simple Logistic regression with keras from 4 features

I am trying to create a simple NN using keras, i have data in this form: which contains rows of 4 numbers ranging from 0 to 100, based on these values i am trying to predict the outcome as 0 or 1 ...
2
votes
1answer
30 views

Spatio-temporal convolutional networks on irregular grids

I'm contemplating a project where I try to take a time series of maps of polygons (which have values) and predict the next map of polygon values. If it were a regular grid, it'd be a ...
0
votes
0answers
23 views

how to consider some miss classifications “half correct” in categorical_crossentropy - for a trading system

I have a trading system where the model receives 9 time-series and predict : A - strong down B - week down C - neutral D - week up E - strong up (these classes ...
1
vote
0answers
27 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
49 views

Batch size stateful LSTM in Keras - how to evaluate with just one sample? [closed]

I'm using Keras to classify time series of 1000 timesteps containing one feature. In keras the input shape of an LSTM is defined as (batch_size, timesteps, features). So my input is f.e. (32,1000,1), ...
0
votes
0answers
19 views

loss='categorical_crossentropy' VS loss=K.categorical_crossentropy

Why I have very different loss values in training using these two lines code to define the loss function? ...
1
vote
0answers
30 views

Totally confused about input_shape dimension of stateful LSTM Network with keras [closed]

let's say I've got 2500 time series of class A, and 2500 time series of class B, both 1000 time steps long. There is only one numerical feature per time series. I want to train a LSTM using Keras to ...
0
votes
0answers
15 views

Training on cifar100 [duplicate]

I am building a model on training a cifar100 images I try to follow others work on training cifar10 and they work very well(around 90% accuracy), so I add some more layers for training cifar100.But ...
0
votes
0answers
27 views

Can't get a Keras model to overfit [duplicate]

(Full disclosure, this is a follow-up to this question, which wasn't completely answered on StackOverflow) The input dataset is a time series of some stock price movement, but it might as well be ...
0
votes
1answer
203 views

Kernel dies when calling fit method [closed]

I am running Python 3.6.8 (Anaconda Distribution) on a MacBook Pro 2017. I keep running into this issue where my kernel dies when I try to called the fit method of a Keras model. This occurs in Spyder,...
8
votes
3answers
83 views

Is it possible to give variable sized images as input to convolutioal neural network

Can we give images with variable size as input to convolutional neural network for object detection? If possible, How can we do that? But if we try to crop the image, we will be loosing some portion ...
0
votes
2answers
49 views

Am I missing obvious problems with my model [closed]

I am using Keras to train a CNN for a single label image classification. The model is being trained on synthesized data and applied to real world images. After a significant amount of trial and error ...
0
votes
1answer
40 views

Training error not decreasing on the training set

I cannot make my neural network - MLP with 1 hidden layer fit the training data perfectly. Here is the data: ...
1
vote
0answers
37 views

Why my validation loss is not converging over multistream model? [closed]

I want to merge two CNNs that are trained over the different dataset. I have taken two sequential models and merged them. But when using customized fit_generator, validation loss is not converging. ...
1
vote
1answer
90 views

Strange batch loss in keras

Im training a Bidirectional RNN with keras.losses.MSE and have my dataset shuffled before training. I manually split it into validation and train data. However when ...
1
vote
1answer
36 views

Data Augmentation in Keras: How many training observations do I end up with?

I'm reading through Francois Chollet's "Deep Learning with Python" and was recently introduced to a concept I had never encountered before in my statistics studies. Namely, data augmentation. I have a ...