Questions tagged [keras]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
17 views

What materials are a starting point for developing deep learning architectures?

So some background on my existing knowledge. I have my masters in statistics where I spent a good amount of time understanding how machine learning algorithms work, but I was always allowed to use ...
0
votes
0answers
7 views

How to add example ID to tf.keras.utils.Sequence?

I am using tf.keras.utils.Sequence to build a dataset and then model.fit() to train a model (similar to how it is done in this ...
0
votes
0answers
3 views

Identifying specific activation scores for certain classes in keras in multi-label classification

I have a question i am hoping somebody might be able to help with. I have trained a sequential model (keras) that attempts to understand multiple labels in a data set. There are hundreds of samples (...
0
votes
1answer
28 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
1answer
11 views

EarlyStopping in combination with GridSearchCV für hyperparameter tuning?

I want to find the optimal hyperparameter (dropout rate, learning rate, number of epochs) for training an CNN-architecture. Does it make sense to integrate EarlyStopping already in GridSearchCV? Or ...
0
votes
0answers
24 views

Custom Loss function Keras gradient

0 I am having trouble implementing a rather simple custom loss function, which calculates the output of the network times y_true, like so: ...
0
votes
0answers
7 views

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

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
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 ...
65
votes
6answers
70k views

What loss function for multi-class, multi-label classification tasks in neural networks?

I'm training a neural network to classify a set of objects into n-classes. Each object can belong to multiple classes at the same time (multi-class, multi-label). I read that for multi-class problems ...
1
vote
0answers
17 views

What would a reversed Inception v3 block look like for a convolutional autoencoder, specifically in the decoder block?

(I've been using Keras but if this is possible in PyTorch I'd be willing to switch my project.) I've been working with convolutional autoencoders and they look promising for my use case. One thing ...
0
votes
0answers
6 views

loss not decreasing with convolutional nn [duplicate]

I have data with 1414 columns and 21 features (1414, 21). It is a regression problem and I am trying to use CNN as a model. In order to use a cnn, I reshaped my ...
0
votes
1answer
2k views

Validation accuracy reach to 1.000 in very first epoch

I am using below small 3D CNN to predict whether 32*32*32 image cube in a CT scan is malignant or not. ...
0
votes
1answer
3k views

Splitting train test set in keras model.fit_generator [closed]

I have single directory, dataset,which contains sub-folders (labels ) of images as shown below. I want to split this into train and test set while using ImageDataGeneroter in keras. Although model....
0
votes
0answers
17 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 ...
2
votes
1answer
270 views

How can I overfit a fully-connected neural network to predict RGB values from (x,y) coordinates?

The problem is the following: Given a single 3-channel image (e.g. 200x150), I constructed a dataset where the features are the pairs of (x,y) coordinates and the targets are the (R,G,B) values. Each {...
0
votes
1answer
28 views

type of the neural network

I am developing a neural network for a binary classification task. I am using the following code: ...
0
votes
0answers
7 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
1answer
24 views

How to prevent the keras convolutional neural network model to over-fit? [duplicate]

I want to build a convolutional neural network and train it to recognise whether the digit is 0 or 1. Example of my training data is a 800 * 600 gray scale image containing a digit one: I have 22 ...
-1
votes
2answers
31 views

Multiple metrics in keras - why and when might we want to use it?

In the keras documentation an example for the usage of metrics is given when compiling the model: ...
0
votes
1answer
1k views

How to design a many-to-many LSTM RNN in Keras

I have timeseries data with 1 minute cadence with 4 features, and I want to try to predict the time-evolution of 2 of these features using a RNN using LSTMs in Keras. My aim is to predict the e.g. ...
0
votes
0answers
20 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
1answer
150 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, ...
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 ...
1
vote
1answer
128 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: ...
2
votes
1answer
40 views

AutoEncoder Reconstruction error for Anomaly Detection

I'm building a convolutional autoencoder as a means of Anomaly Detection for semiconductor machine sensor data - so every wafer processed is treated like an image (rows are time series values, columns ...
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 ...
1
vote
1answer
331 views

How to frame a Time Series forecasting problem for LSTM Neural Networks?

I have a dataset of points along a wave whose cycles slowly grow in period over time. I have ~47 cycles worth of data. My goal is to forecast at least one whole cycle into the future (around 50 data ...
1
vote
0answers
23 views

Autoencoder predictions for extremely simple task does not make intuitive sense

I am training a simple autoencoder in Keras. The input is of length two, where each element can either be 0 or 1. This gives four distinct input possibilities: [0, 0], [0, 1], [1, 0], [1, 1]. Since ...
0
votes
2answers
93 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
1answer
171 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 ...
1
vote
1answer
21 views

Is there any deep learning work using unit norm constraints?

I am currently trying to develop an architecture that could benefit from a unit norm constraint on the convolutional weights. I saw in keras docs, that this constraint was available. Therefore I ...
1
vote
1answer
14 views

Accuracy converging to one in neural network (tensorflow.keras)

I was wondering if somebody would be able to shine a light on accuracy converging to 1 relatively quickly during training. I am working on some new data and this is the first time i have seen this. ...
1
vote
1answer
369 views

How to implement 1D Convolutional Autoencoder with multiple channels? [closed]

I want to build a 1D convolution autoencoder with 4 channels in Keras. Instead of images with RGB channels, I am working with triaxial sensor data + magnitude which calls for 4 channels. I haven't ...
14
votes
3answers
5k views

Is it possible to give variable sized images as input to a convolutional neural network?

Can we give images with variable size as input to a 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 ...
0
votes
1answer
19 views

l2 lambdas in Keras.regularizers [closed]

Is the value supplied to the shrinkage regularizers (l1 and l2) in Keras the inverse of the lambda coefficient? e.g. ...
0
votes
1answer
97 views

How to compare CNN models with non-reproducible results?

I try to compare different CNN models. I use Keras and for training, I use a GPU, Google Colab with Tensorflow backend. Unfortunately I'm not able to create the same initial conditions for the CNNs (...
6
votes
2answers
4k views

Difference between kernel, bias, and activity regulizers in Keras

I've read this post, but I wanted more clarification for a broader question. In Keras, there are now three types of regularizers for a layer: kernel_regularizer, <...
1
vote
0answers
18 views

Using LSTM to find mode of a sequence [closed]

I trained an LSTM network to predict the mode of a sequence of real numbers. I found the performance to be poor. Initially, I thought this is a fairly easy objective and LSTM networks would perform ...
0
votes
0answers
24 views

Weight initialization in neural networks

Hi I am developing a neural network model using keras. code ...
0
votes
1answer
42 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, ...
3
votes
1answer
623 views

Keras: val_loss decreases while loss increases

I set up a model in keras (in python 2.7) to predict the next stock price in a particular sequence. The model I used is shown below (edited to fit this page): ...
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
1answer
391 views

Why CNN doesn't give higher accuracy over simple MLP network? [From Keras examples]

I'm still new to machine learning and just came across powerful deep learning library, Keras. I've read Keras document and tried few Keras examples on Github here. I've also studied some basic ...
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 ...
1
vote
1answer
15 views

step size in the first epochs of adam are too large [closed]

When I train models in keras with keras.optimizers.Adam(learning_rate=0.001), I typically get a history of the training error over the training time in epochs like in the plot below. This looks like ...