Questions tagged [keras]
Open source high-level neural network library for Python and R. Uses TensorFlow as backend.
673 questions
1
vote
1
answer
96
views
Why is the Keras MNIST dataset split into training and test samples of lengths 60k and 10k respectively?
The MNIST dataset can be obtained directly using Keras by running the following lines of Python code.
...
1
vote
0
answers
139
views
Which is better: tensorflow 2.3.0 with GPU or tensorflow 2.18.0 with only CPU? [closed]
What is the speed of running tensorflow 2.3.0 with GPU relative to tensorflow 2.18.0 with only CPU?
Hardware
Laptop: MacBook Pro 15-inch 2012 64-bit.
OS: Windows 10 Pro 22H2
Processor: Intel(R) Core(...
1
vote
0
answers
54
views
Model still overfits after hyperparameter tuning, dataset balancing and convolution layering
I am trying to classify either an image of 25x25 px stacked together as 50x25 px is the same(1) or different(0). I am using keras to create the NN layers. There are 10,000 instances of both 1s and 0s ...
2
votes
1
answer
69
views
What would be the convolutional layer output by keras.layers.Conv2D when conv output is fractional?
I have input ($n=224$), strides ($s=4$), filter size ($k=11$) and no padding which gives me a fractional conv output:
$$\texttt{conv output} = (n-k+2p)/s + 1 = 54....
1
vote
0
answers
33
views
Image classification metrics
I have been working on an image classification task using CNNs and getting some puzzling results.
My training, validation and test loss keep going down with epochs and are comparable. So this might ...
0
votes
0
answers
242
views
How to detect small details in high resolution images using CNNs?
I have the goal of training a CNN model that can detect if clothing items has any defects (holes, stains etc.) on them. I am using Keras to accomplish this. I will use the model for image ...
1
vote
1
answer
562
views
The loss of VAE is negative. is it normal?
the function loss of VAE is :
...
0
votes
1
answer
163
views
Creating a CNN model for multi-output prediction where one target variable is categorical, and others are numeric
I want to create a simple CNN model for multi-output prediction. The predicted values are four numeric values (all between 0-1) and one categorical value (4 classes). When I try to create a model ...
1
vote
0
answers
61
views
Neural Network ReLU majority of weights small
When I view a histogram of my weights it is very much centred at 0, with the overwhelming majority being very small. I want to ensure I do not have a vanishing gradient problem.
I must preface this ...
0
votes
1
answer
523
views
Why not use input padding in the first attention block in transformer decoder
I was studying the transformer decoder code below in Keras/Tensorflow. It was not clear how they made making decisions.
In the first attention block below (self.attention_1), why did they use ...
0
votes
0
answers
68
views
Assistance with LSTM Keras model for predicting heart rate from velocity
Good Morning,
Currently, I'm new to Kears and neural networks in general. I'm working through Deep Learning In R With Keras with a 'capstone' project in mind, but I'm struggling to understand how to ...
1
vote
0
answers
37
views
Predicting new timeseries based on related timeseries?
Let's say I have multiple timeseries, representing different features, all of length n, and I want to predict a new timeseries which represents another feature, without any past history for that ...
1
vote
0
answers
122
views
Adam optimiser strange behaviour on first epoch if using EMA
In the first training epoch, the Adam optimiser seems to reset the weights of my model if I have use_ema=True. I am compiling a keras model and loading weights from a file using
...
0
votes
1
answer
382
views
How do I determine the output dimension of my input layer?
I'm building a keras model for a binary classification.
...
1
vote
0
answers
36
views
Create different model architectures in loop [closed]
I'm building a NN using keras and I'd like to build different architectures.
My question: Can I create several models with a different number of layers at once? (e.g. using a loop).
It should be ...