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

How can I visualize weights of various Keras model layers?

Mostly just for funsies I want to visualize various layers of a Keras model as it's training. So, let's say I make a wee model: ...
0
votes
0answers
9 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
29 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 ...
1
vote
0answers
12 views

Why is my keras resnet50 model overfitting? [duplicate]

I have applied Keras ResNet-50 on a small x-ray image dataset. I tried making layers both trainable and non-trainable, but my model validation accuracy doesn't improve above 50%. I don't understand ...
0
votes
0answers
14 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: ...
1
vote
1answer
70 views

Is the Keras Embedding layer dependent on the target label?

I learned how to 'use' the Keras Embedding layer, but I am not able to find any more specific information about the actual behavior and training process of this layer. For now, I understand that the ...
0
votes
0answers
7 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
1answer
24 views

What are the effects of a high learning rate?

I have trained a lot of simple convolutional neural networks for some classification task where I varied the hyper-parameters. As an optimizer i used SGD and I trained the models using different ...
0
votes
0answers
45 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 ...
0
votes
1answer
43 views

Am I reading my dataset right?

Since I'm new in deep learning I have some questions. I made some tests with keras and mnist dataset and everything was OK. Then I decided to try with some of my datests. You could find the dataset ...
0
votes
0answers
12 views

What type of accuracy should I reported in research paper?

I have read some research papers on the classification task of deep learning, and now I am doing my own. After investigating some research paper which also provided the source code for reproducing ...
1
vote
1answer
24 views

training a nn with f1 as loss on keras doesn't work?

I have no problem to train my neural network with categorical_crossentropy as loss but when I do the same with f1, it just doesn't progress : Epoch 1/9 1029/1029 [==============================] - ...
0
votes
0answers
17 views

High accuracy on both training and validation but very low on test set

My CNN model has about 96~97% accuracy on both training and validation sets. But when submitting the test set it got only 24% accuracy. Here's my model: ...
0
votes
0answers
31 views

Keras GridSearchCV: Train and Validation Accuracy high but low test accuracy? (SOLVED, BUT WITH A NEW DOUBT IN CV) )

CODE SNIPPET Binary classification problem where train_data : N X H X W X F train_labels: N X 1 ...
1
vote
1answer
28 views

Reproducible numbers in Keras/TensorFlow

Every time I run a Keras/TensorFlow code gives different results. Can someone suggest how to get reproducible numbers?
0
votes
1answer
34 views

How to implement thresholded softmax in Keras?

I would like to implement a threshold after the final softmax layer in a Keras-built classification problem so that class assignments with probability below some threshold alpha are disregarded (i.e. ...
0
votes
0answers
14 views

Using variable dropout in Keras

I need to implement a system with variable dropout factor in Keras with TensorFlow as backend. The dropout factor should change for each batch so that the the dropout factor varies from 0.0 to 0.20 at ...
0
votes
1answer
22 views

Back propagation is done with each batch in a convolutional net, but is it also done with the validation set?

It's my understanding that the weights are updated in a convolutional neural network with each evaluation of a batch. But when the training data has been processed and it comes to predicting ...
0
votes
0answers
13 views

How do I implement masking in TensorFlow eager?

I am training a stateful RNN on variable length sequences (optional: see my previous question for more details). I padded the sequences to a fixed length with the value -1. The when batches are ...
0
votes
0answers
6 views

what is the difference between sklearn's train_test_split and keras load_data()?

im experimenting on autokeras, while doing so i came across something like (x_train, y_train), (x_test, y_test) = mnist.load_data(), is this different from sklearn.model_selection....
0
votes
0answers
18 views

Meaning of kernel size 1 for 1-D convolution in Keras

The kernel size is the window size for 1D convolution. Can anyone explain what is meant by kernel size $1$ in Keras/TensorFlow?
0
votes
0answers
12 views

Difference between retraining on different portions of data and training initially on larger data set

I have a large data set that doesn't fit in memory and would have to use something like Keras's model.fit_generator if I would like to train the model on all of the ...
0
votes
1answer
53 views

Should I Choose the best model based on test error or validation error?

I divided my dataset to training, validation and test sets. Then trained multiple forecasting models on the training dataset. now I have 3 errors for each model: Training error Validation error Test ...
0
votes
1answer
22 views

1-D convolution neural network in Keras

I am exploring 1-D CNN with Keras. My data is $\mathit{k}\times\mathit{N}$ where $\mathit{k}$ is the number of time stamps and $\mathit{N}$ is the number of features. I want to apply CNN with 1-D ...
0
votes
0answers
14 views

Scaling label values of a Tensorflow dataset

I used Keras to build a model. The summary looks like this: ...
0
votes
0answers
29 views

Neural Network Accuracy Bouncing Around and Never Going Over 50% Accuracy [Not Duplicate] [duplicate]

My NN accuracy is bouncing between .29 and .37. Sometimes it starts at .5, but then decreases as it continues. The loss also bounces around, decreasing, increasing, and generally staying around 1. The ...
-3
votes
1answer
35 views

why the neural network gives me null results? [closed]

I trying to predict some fluid parameters, you will find the data I use in the drive link (24 input and 3 output to predict): DATA. first of all I replaced the null values ​​in the data with the ...
0
votes
0answers
20 views

Holdout loss much worse than training & testing data

I am creating a simple MLP which is to predict a single output based and 9 inputs. The data is scaled between 0 and 1, and the data is shuffled before training. The resulting model leads to very low ...
1
vote
1answer
35 views

Why is using keras ImageDataGenerator for data augmentation relevent?

I have used keras ImageDataGenerator to generate more data in my neural networks as I have had really small datasets and it has proven itself. As far as I ...
0
votes
0answers
37 views

Custom TF 2.0 training loop performing considerably worse than keras fit_generator - can't understand why

In trying to better understand tensorflow 2.0, I am trying to write a custom training loop to replicate the work of the keras fit_generator function. In my head, I have replicated the steps ...
0
votes
0answers
19 views

Full-parametric Weibull accelerated failure time model using deep-learning library Keras

I wonder if it is possible to fit a full parametric AFT model with the deep-learning library keras. My AFT model assumes that survival function is influenced by some covariate specific acceleration ...
2
votes
1answer
49 views

Does Keras SGD optimizer implement batch, mini-batch, or stochastic gradient descent?

I am a newbie in Deep Learning libraries and thus decided to go with Keras. While implementing a NN model, I saw the batch_size parameter in ...
0
votes
0answers
23 views

Dealing with images of variable resolution in CNN autoencoders

Let's suppose would like to build a CNN autoencoder that would be able to turn greyscale images into coloured ones. The final model should be able to accept images of any resolution. Also, note that ...
0
votes
0answers
22 views

Accuracy of RNN getting stuck after 90% [duplicate]

I am using Keras RNN Cell to perform parts of speech tagging. The architecture is as follows(I cannot put the code because of privacy reasons) : An embedding layer of of 40 units of shape (...
5
votes
1answer
99 views

Can small SGD batch size lead to faster overfitting?

I have feedforward neural net, trained on cca 34k samples and tested on 8k samples. There is 139 features in dataset. The ANN does classification between two labels, 0 and 1, so I am using sigmoid ...
0
votes
0answers
8 views

Simple Keras LSTM model does not converge [duplicate]

I try to predict time-series with simple Keras LSTM model: ...
0
votes
0answers
23 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
7 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
26 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
1answer
19 views

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

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
1answer
52 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
19 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
1answer
28 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
9 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
65 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 ...
3
votes
0answers
24 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 ...
0
votes
0answers
8 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
18 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 ...