Questions tagged [keras]

For questions related to Keras, the modular neural networks library written in Python. However, note that programming questions are off-topic here.

Filter by
Sorted by
Tagged with
4
votes
1answer
41 views

How to graphically represent a RNN architecture implemented in Keras?

I'm trying to create a simple blogpost on RNNs, that should give a better insight into how they work in Keras. Let's say: ...
1
vote
1answer
80 views

Advantage Actor Critic model implementation with Tensorflowjs

I am trying to implement an Actor Critic method that controls an RC car. For this I have implemented a simulated environment and actor critic tensorflowjs models. My intention is to train a model to ...
-1
votes
1answer
93 views

Number of units of the last layer [closed]

I am preparing a binary classifier. Initially, I used the following parameters based on the well-known cat and dog classifier example; ...
2
votes
2answers
85 views

How can I use autoencoders to analyze patterns and classify them?

I generated a bunch of simulation data from a complex physical simulation that spits out patterns. I am trying to apply unsupervised learning to analyze the patterns and ideally classify them into ...
0
votes
0answers
34 views

What is the role of this initial state of the LSTM layer in an encoder of a seq2seq model?

I am trying to follow this guide to implement a seq2seq machine translation model: https://www.tensorflow.org/tutorials/text/nmt_with_attention. The tutorial's ...
0
votes
1answer
90 views

How to handle extremely 'long' images?

After transforming timeseries into an image format, I get a width-height ratio of ~135. Typical image CNN applications involve either square or reasonably-rectangular proportions - whereas mine look ...
0
votes
0answers
16 views

Which is the Best Way to Create Training Sequences for LSTM-based Class Prediction on Time-series Data?

Let's say I have time-series data in the following way. I need to create training sequences of a fixed length as an input to my LSTM model on PyTorch. ...
1
vote
0answers
29 views
4
votes
1answer
624 views

Over- and underestimations of the lowest and highest values in LSTM network

I'm training an LSTM network with multiple inputs and several LSTM layers in order to set up a time series gap filling procedure. The LSTM is trained bidirectionally with "tanh" activation ...
2
votes
1answer
43 views

Preparing data set for the YOLO algorithm

Hi I am working on a project which requires the You Only Look Once algorithm in order to classify and localise objects within images. I have to prepare my dataset (which has 2 classes, and predicts 6 ...
0
votes
0answers
10 views

How to write activation function with a higher order tensor in Keras? [migrated]

I want to create a paricular neural network in Keras. In this neural network I use layers given by $$ f(x) = C_k(\underbrace{x,\dots,x)}_{\times k}+\phi(w^\intercal x+b) $$ The expression $\phi(w^\...
3
votes
1answer
571 views

Periodic Pattern in Validation Loss Curve

I am currently trying to solve a regression problem using neural networks. I want to detect movement patterns in images over time (video) and output a continuous value. During the training process I ...
1
vote
2answers
46 views

How can I model any structure for a neural network?

Hello I am currently doing research on the effect of altering a neural network's structure. Particularly I am investigating what affect would putting a random DAG (directed acyclic graph) in the ...
1
vote
1answer
22 views

What is the input to the left most LSTM cell c(t-1) and h(t-1)?

Given an LSTM model with 3 cells shown below, what would be the input to the left most cell c(t-1) and h(t-1)?
2
votes
1answer
51 views

Is it possible to use an internal layer's outputs in a loss function?

For a network of the form: Input(10) Dense(200) Dense(100+10) Dense(20) Output() Those +10 outputs are what I want to add to ...
1
vote
1answer
41 views

Number of parameters in Keras/Tensorflow Dense layers

I am a bit confused about how the number of parameters are calculated in Dense model for the Kera/Tensorflow. For example, in the figure below I thought that both the statements were the same, but I ...
0
votes
1answer
35 views

Extract Features at Multiple Image-Scales

I try to replicate the results of this paper. They state, that they used VGG16- and VGG19-models pretrained on imagenet and used the output of the last convolutional layer (without relu and max-...
1
vote
0answers
28 views

Is a true RNN auto encoder possible with Keras/TF

I want to get some encodings for temporal data (with a highly varying number of timesteps). The dataset is of the format: ...
0
votes
0answers
23 views

Are there any inverse RNN layers?

Given the model: Sequence([ GRU(200, input_shape=(None,100), return_sequences=False) ]) Which maps the space ...
3
votes
2answers
49 views

Can predictions of a neural network using ReLU activation be non-linear (i.e. follow the pattern) outside of the scope of trained data?

Training on a quadratic function x = np.linspace(-10, 10, num=1000) np.random.shuffle(x) y = x**2 Will predict an expected quadratic curve between ...
2
votes
1answer
69 views

How to represent integer values in sequence to sequence prediction task in encoder-decoder LSTM?

I have a large 2D grid having 30k rows and 35k columns, so a total of 30x35k grid cells. Each grid cell is represented by a unique integer number (identity of grid cell). I have several trajectories ...
1
vote
1answer
228 views

Binary mode or Multi-label mode is correct when using binary crossentropy and sigmoid output function on multi-label classification

I would like to ask a question about the relationship of accuracy with the loss function. My experiment is a multiclass text classification problem, and I have built a Keras neural network to tackle ...
4
votes
1answer
764 views

Adding a dense layer after a conv2d layer in a convolutional autoencoder

I am trying to implement a convolutional autoencoder with a dense layer at the bottleneck do to some dimensional reduction. I have seen two approaches for this which arent particularly scalable. The ...
2
votes
1answer
2k views

How to compute number of weights of CNN?

How can we compute number of weights considering a convolutional neural network that is used to classify images into two classes : INPUT: 100x100 gray-scale images. LAYER 1: Convolutional layer with ...
1
vote
1answer
210 views

Why is my validation/test accuracy higher than my training accuracy

Is this due to my dropout layers being disabled during evaluation? I'm classifying the CIFAR-10 dataset with a CNN using the Keras library. There are 50000 samples in the training set; I'm using a ...
2
votes
1answer
120 views

Why is this ResNet50 misclassifying objects?

I'm new to Deep Learning, and I have some conceptual problems. I followed a simple tutorial here, and trained a model in Keras to do image classification on 10 classes of logos. I prepared 10 classes ...
1
vote
1answer
114 views

Which model can I use for this problem with multiple inputs and outputs?

Which model is the most appropriate for this problem with multiple inputs and outputs? The data set is A1, A2, A3, A4, A5, A6, B1, B2, B3, B4 where ...
0
votes
0answers
17 views

Multi dimensional LSTM modeling in KERAS

I have a database of time series signals with multiple features and Im trying to build a model to predict whether or not two samples are related to each other. For example : a database of 1000 sample ...
0
votes
0answers
12 views

How to predict when a number will occur again, give an array of integers?

I am new to machine learning and AI. I'm trying to create a program that adds a random number (1-5) to an array every 1 second and at a random point stops doing that. If that's the case, then it shall ...
0
votes
1answer
29 views

“Porpoising” in latter stages of validation loss and MSE charts in Keras

Performing a prediction of a continuous y target using Keras, the simple structure of the code revolves around; ...
1
vote
1answer
26 views

Does use of GPU reduces time of execution of .predict() method in Keras/TF model? [closed]

Does using GPU instead of CPU with tensorflow and keras model reduces the time of .predict() method on a trained network or maybe it only reduces time of training of the network?
4
votes
0answers
40 views

It is possible to use deep learning to give approximate solutions to NP-hard graph theory problems?

It is possible to use deep learning to give approximate solutions to NP-hard graph theory problems? If we take, for example, the travelling salesman problem (or the dominating set problem). Let's say ...
1
vote
1answer
36 views

Should one use an “other” category in image classification?

In image classification, there are sometimes images that do not fit in any category. For example, if I build a CNN in Keras to classify Dogs and Cats, does it help (in terms of training time and ...
0
votes
0answers
22 views

Compression of real time speech data

I am trying to train 2 neural networks - one to compress and the other to decompress real time speech data, and I have a few questions. First off Would this even work - trained, of course, on the same ...
0
votes
1answer
50 views

Hand-Signs Recognition using Deep Learning Convolutional Neural Networks

I am developing a CNN model to recognize 24 hand-signs of American Sign Language. I have 2500 Images/hand-sign. The data split is: Training = 1250 Images/hand-sign Validation = 625 Images/hand-sign ...
1
vote
1answer
36 views

How to train a neural network with few weights and biases held constant?

I am a beginner in neural networks. I am building a neural network with 3 layers. The input $X$ has 7 features and the output $Y$ is a real number. In the hidden layer, there are two nodes. The bottom ...
2
votes
1answer
218 views

Does this tutorial use normalization the right way?

There is this video on pythonprogramming.net that trains a network on the MNIST handwriting dataset. At ~9:15, the author explains that the data should be normalized. The normalization is done with ...
1
vote
1answer
148 views

How can I make the kernels non-learnable and set them manually?

I'm a newbie in Convolutional Neural Networks. I have found out that kernels in convolutional layers are usually learned while training. Suppose I have a kernel that is very good to extract the ...
0
votes
1answer
25 views

setting up last layer in tensoflow for class type of label [closed]

I am creating a NN in tensorflow keras. the inputs are all float and the output is a class. The output currently encoded as a float, but only has 4 values (0,1,2,3). My model is similar to this: ...
0
votes
0answers
53 views

Is it possible to transform audio with neural networks to make it sound like 3d sound

so the idea is to feed neural network data like input: mono audio(extracted from existing 3d audio) output: 3d audio after training it should convert mono audio to 3d sound do you think it is possible?...
1
vote
1answer
32 views

Keras 1D CNN always predicts the same result even if accuracy is high on training set

The validation accuracy of my 1D CNN is stuck on 0.5 and that's because I'm always getting the same prediction out of a balanced data set. At the same time my training accuracy keeps increasing and ...
1
vote
1answer
49 views

How to construct input dependent convolutional filter?

I am constructing a convolutional variational autoencoder for images, starting out with mnist digits. Typically I would specify convolutional layers in the following way: ...
1
vote
0answers
30 views

Does the order of data augmentation and normalization matter?

What is the preferred order of data augmentation and normalization? Is it the former followed by the latter?
0
votes
0answers
80 views

How to make an ensemble model of two LSTM models with different window sizes i.e. different data shapes

Below is the Python code for making an ensemble model. All the inputs are the same for all three models. But what if the models have different input shapes due to different window size, such as LSTM ...
2
votes
1answer
52 views

Is CNN capable of extracting the descriptive statistics features

I was trying to build a CNN model. I used time series data of daily temperature to predict if there is risk of an event, say bacteria growth. I calculated the descriptive statistics of the time series,...
2
votes
0answers
32 views

Single-value loss/training in a CNN with a tensor output

I am playing around with an idea of using using Q-learning with a DQN (Deep Q-Network), to determine the optimal position of a number of 'units' on a grid of allowed locations, according to some ...
0
votes
1answer
42 views

How to use 'Canny/Watershed' algorithm's output as an input for Image Classification Model

I have a very silly problem in hand. I have implemented 2 methods which give me the mask to separate the objects from the background. What I get from one method is the object encapsulated in the red ...
3
votes
3answers
7k views

How to speed up YOLOv3 detection speed?

I want to implement YOLO V3. I want to know which framework will give me a faster result. What are the advantages of implementing YOLO V3 on the darknet framework vs Keras framework?
0
votes
0answers
30 views

Yolo from scratch dataset and output

Hi I coded a YOLO model from scratch and just came to realise that my dataset does not fit the models output. This is what I mean: The model outputs a ...
2
votes
2answers
201 views

How to train a LSTM model with multi dimensional data

I am trying to train my model using LTSM layer in Keras (python). I have some problems regarding the data representation and feeding it into the model. My data is 184 XY coodinates encoded as a numpy ...

1
2 3 4 5 6