The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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

How to implement 1D Convolutional Autoencoder with multiple channels?

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 ...
10
votes
3answers
4k 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
0answers
8 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 ...
0
votes
1answer
17 views

l2 lambdas in Keras.regularizers [on hold]

Is the value supplied to the shrinkage regularizers (l1 and l2) in Keras the inverse of the lambda coefficient? e.g. ...
0
votes
1answer
54 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, <...
0
votes
0answers
13 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
2answers
40 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 ...
1
vote
0answers
16 views

Using LSTM to find mode of a sequence [on hold]

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

Weight initialization in neural networks

Hi I am developing a neural network model using keras. code ...
0
votes
1answer
34 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
607 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
57 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
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
1answer
383 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
51 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
14 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 ...
2
votes
0answers
32 views

Custom RMSE loss not the same as taking the root of built-in Keras MSE loss [closed]

I have defined a custom RMSE loss function: def rmse(y_pred, y_true): return K.sqrt(K.mean(K.square(y_pred - y_true))) I was evaluating it against the mean ...
0
votes
1answer
20 views

Reconstruction error drops for an anomaly?

I have a convolutional Autoencoder being used as an anomaly detector, it works well. Today however I trained it on a new training/test data set and the anomalies were exposed as a drop in ...
2
votes
2answers
4k views

How to train a LSTM model for a next basket recommendation problem?

I try to use a LSTM model for a problem of next basket recommendation. I would like to apply the same approach as this article in Python using Keras : A Dynamic Recurrent Model for Next Basket ...
2
votes
1answer
455 views

Convolutional neural network: why would training accuacy and well as validation accuracy fluctuate wildly?

I am training a convnet on a binary classification problem using medical images. I;m doing a preliminary evaluation of various shallow nets to get a sense of what the best hyperparameters are likely ...
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. ...
1
vote
0answers
24 views

How to make a custom activation function in keras with a learnable parameter?

The answer to this question is generally to implement it as a new layer and do layer = Dense(num_neurones)(previous_layer) out = TheActivationFunction()(layer) ...
1
vote
1answer
22 views

What does Keras Concatenate actually do? [closed]

A simple question, but what does Keras Concatenate actually do?. If I have two input layers with size 200 each and pass them through a concat layer what has actually happened? Does it just mean the ...
0
votes
0answers
9 views

CNN Feature Extraction Time

I have a dataset consist of 260 thousands images that are extracted from several videos. I want to extract features of these images and use them for frame retrieval. I used VGG16 (pretrained on ...
1
vote
1answer
587 views

MobileNets object keypoints localization with Keras

I'm trying to use MobileNets to localize a rectangular object in an image. I want to construct a model that inputs an image, and outputs the keypoints/coordinates (8 total points) of each corner of ...
2
votes
3answers
3k views

Keras ImageDataGenerator [closed]

I find the documentation and tutorials on the Internet surrounding ImageDataGenerator (the data augmentation function for Keras) to not really explain much at all how it works. Following the ...
1
vote
1answer
290 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
1answer
108 views

Loss function (and encoding?) for angles

I'm training a network to predict the angle of arrival of a signal. Labels are single values in the [-180, 180) interval. I'm seeing a discontinuity in predictions around ±180 degrees, which makes ...
0
votes
1answer
68 views

Distorted validation loss when using batch normalization in convolutional autoencoder

I have implemented an variational autoencoder with convolutional layers in Keras. I have around 40'000 training images and 4000 validation images. The images are heat maps. The encoder and decoder are ...
12
votes
3answers
16k views

What is the difference between Conv1D and Conv2D?

I was going through the keras convolution docs and I have found two types of convultuion Conv1D and Conv2D. I did some web search and this is what I understands about Conv1D and Conv2D; Conv1D is used ...
0
votes
1answer
36 views

Why is my neural network giving unequal probabilities when predicting an image that isn't one of the given classes?

Let's say I had 5 different types of images I wanted to classify in my neural network and I trained it on 10,000 images. When it is done training, I give it an image that it has never seen before and ...
1
vote
1answer
169 views

Why is it hard for a neural network to learn the identity function?

I wanted to see if a neural network could learn the identity function using the MNIST handwritten dataset. Here is the full code ...
2
votes
2answers
156 views

How can I train my deep learning model on another similar yet different dataset

I am doing semantic segmentation (multi-class classification of image pixels) using convolutional neural networks (CNN) in Keras. In particular, I am applying this to aerial images of crops (...
0
votes
1answer
77 views

no attribute '_inbound_nodes' error even when using Lambda layer in Keras [closed]

I have a (28,000 x 300) dimension matrix, let's call it label_embedding, which I want to do a dot product with the bottleneck layer of my model. I have created an architecture which gives a (...
0
votes
0answers
7 views

Can a neural network independently change its learning parameters while the error between what was predicted and what was not the most minimal in R

I performed script which create forecast of usd/btc pair. Data was taken form open source https://www.cryptodatadownload.com/apac/ https://www.cryptodatadownload.com/cdd/Binance_BTCUSDT_1h.csv Here ...
0
votes
0answers
30 views

Using both batches and buckets in neural network

I think I understand what batches serve for in neural network training, especially after reading this question. It has also clear correspondence in libraries like Keras: ...
0
votes
0answers
14 views

How to improve CNN image classification model? [duplicate]

I have trained my CNN (without transfer learning) model with 736 training and 256 test data and I created my confusion matrix and a class report but my model didn't good classify the images. How can I ...
0
votes
1answer
153 views

which deep learning model to use for array sequence classification?

i am trying to classify a sequence of 10 numbers with keras and tensorflow. a common neural network doesn't seem to be an option. here is my data: ...
0
votes
0answers
37 views

Deep Learning for small 1-dim Datasets

I am trying to find a neural network architecture for a dataset (150 instances) with 10 features (numerical). The features are not associated to each other, so 1d-convolutions are not an option. ...
4
votes
1answer
766 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-...
0
votes
0answers
10 views

Loss magnitude showing 0 at first epoch yet predictions are completely off

I'm trying neural network for the first time. I'm getting a weird output - while loss magnitude is apporaching 0 at the first epoch itself, the predictions are trash! can some one explain what's going ...
4
votes
0answers
60 views

Time series predictions look suspiciously good [closed]

I am working on a time series forecasting problem. For this, I am training a recurrent neural network in Keras (mostly following the guidelines from this blog post by Jason Brownlee). My problem ...
2
votes
3answers
41 views

How can I create a neural network that can recognize objects without having data for objects that aren't in the classification set?

I have a data set of 10,000 images of 5 different recycling items. The goal of my neural network is to tell me if an item is recyclable or not. The problem is that I only have data for the 5 different ...
1
vote
0answers
7 views

Needing 4th dimension for shape [closed]

I was working on a transfer learning solution to categorize between diseases in the eye. I was using the Xception model built into Keras and it uses a data set that I was able to accumulate. However ...
0
votes
1answer
26 views

How do I fix this dimenion error in keras / tensorflow? [closed]

This is the code I am trying to run. X is an array of shape (1000,26) and Y is of shape (1000, 1). I am trying to fit a model that predicts a 1 or a 0 for each row of the X array. For whatever reason ...
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-...
0
votes
1answer
15 views

Increasing sample size increases no of trainable parameters

I was working with keras and tensorflow as backend on an NLP problem when I observed that increasing my training data size caused an increase in the number of trainable parameters even when batch size ...
0
votes
0answers
14 views

How can I iterate on the hidden activations in a neural network? - Lifetime and spatial sparsity in WTA Autoencoders

I've built a convolutional autoencoder and trained it on MNIST in keras and tensorflow. I wanted to make this autoencoder a WTA autoencoder as talked about in this paper. To do so, I need to add ...