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
1 vote
0 answers
27 views

Why can't I reproduce my results in keras using random seed? [closed]

I was doing a task using RNN to predict a time series movement. I want to make my results reproducible. So I strictly followed this post: https://stackoverflow.com/questions/32419510/how-to-get-...
user avatar
0 votes
0 answers
9 views

is there any variation in the results if you resize a image with black lines?

Hello I need to resize a lot of images each of these has its own random size, for example, I have photos with the following size 100x200 102x200 202x201 ... in general, the resolution of each photo of ...
user avatar
  • 113
2 votes
3 answers
164 views

Is it possible to learn the number of layers?

Is it possible, in a transformer or other deep architecture, to include the number of layers as a parameter of the model so it could be learned? In fact, I have a keras layer that I use to change the ...
user avatar
  • 51
0 votes
0 answers
54 views

How to combine an image and a set of parameters as input to a GAN?

I have worked with a few GAN-like algorithms, but always with similar inputs and outputs. Being only a novice in deep learning, I often work by adapting an already existing Notebook, but today I have ...
user avatar
-1 votes
1 answer
69 views

Denoise autoencoder not training properly [closed]

I'm trying to make a denoise autoencoder wherein the encoder part is vgg16 and decoder is opposite of vgg16(encoder) network. My dataset consists of 5K images in grayscale. Now while training, the ...
user avatar
-1 votes
1 answer
257 views

can't find a viable import class for keras.utils.Sequence [closed]

I am using Google Colab. tensorflow version = 2.8.0, and keras is the same. I am trying to get a BalancedDataGenerator(Sequence) class created, but I can't get <...
user avatar
0 votes
2 answers
37 views

Overfitting problem - poor performance on test data

I'm facing the problem of overfitting and I can't deal with it - I tried experimenting with optimizer, but nothing seems appropriate. My model has extremely poor performance on testing data and the ...
user avatar
  • 1
0 votes
1 answer
48 views

Do the values over 0.5 mean my model classified the data as a "1" label and vice versa?

I am doing binary classification using an LSTM and my output layer is 1 neuron with a sigmoid function. My labels are either 0 or 1. ...
user avatar
0 votes
0 answers
21 views

Neural network have difficulty on capturing weak characteristics

I want use neural network to approximate a non-linear function. The function is, $$ F(X1,X2,X3) = A \times X1^{K1} \times exp((X1-X2) \times K2) \times exp(X3 \times K3) $$ where X1/X2/X3 are input ...
user avatar
0 votes
1 answer
77 views

Which approach can I use to generate forged signatures from real ones?

I am in internship period and I'm working on a signature verification problem. This process needs real and forged signatures. All I have are the real signatures (like 30 signatures per person), and I ...
user avatar
0 votes
0 answers
24 views

Can you train LSTM on a dataset with several separate time-series?

I want to use LSTM in the problem of sports prediction. I know you can use LSTM to predict time-series values such as financial data ... In such time-series each value is part of the same sequence. In ...
user avatar
0 votes
1 answer
64 views

Where can I find authentic references on "categorical cross entropy" and "categorical accuracy metric"?

My Python source code uses TensorFlow and Keras to implement a neural network. The Keras source code uses something called "categorical cross-entropy" and "categorical accuracy metric&...
user avatar
-1 votes
1 answer
138 views

Low accuracy and high loss in multi-class classification [closed]

I'm trying to classify images in 17 flowers dataset which consist of 1360 images of 17 classes (80 images per class); I have to use DNNs only therefore I made my model with the following settings: <...
user avatar
0 votes
1 answer
108 views

Weights initialization once the Neural Network is trained

I am trying to understand how weights are initialized in a Neural Network using Keras deep learning framework and what happens if I train a Neural Network and then I want to train it again: are the ...
user avatar
0 votes
1 answer
33 views

Why does validation accuracy stop rising so soon?

I have implemented a GRU to deal with youtube comment data. I am a bit confused about why the validation score seems to even out around 70% and then keeps rising, this doesn't look like overfitting ...
user avatar
  • 1
1 vote
2 answers
284 views

Are these book example CNN results realistic?

I've been following a deep learning book and the current section I'm on is about convolutional neural networks. The author presents some code to create a basic CNN with about 1 million parameters, ...
user avatar
  • 21
0 votes
0 answers
58 views

Why is the simplest U-Net architecture giving the best (but not good enough) results on a multi-class segmentation on microscopic data?

Currently, I'm trying to optimize a training process of a neural net to improve final results. The problem I'm dealing with is multiclass segmentation on microscopic data. The paradox is that the best ...
user avatar
  • 11
0 votes
0 answers
122 views

Why is val accuracy 100% within 2 epochs and incorrectly predicting new images? (1,000 images per class when training)

My CNN tensorflow model reports 100% validation accuracy within 2 epochs. But it incorrectly predicts on single new images. (It is multiclass problem. I have 3 classes). How to resolve this? Can you ...
user avatar
0 votes
0 answers
28 views

Adversarial Autoencoder is not working and not learning properly

I am trying to get an Adversarial AutoEncoder going using keras Fit method on a keras.model class but for some reason it is not working. Keep in mind that I tried updating encoder and decoder at the ...
user avatar
  • 1
2 votes
2 answers
54 views

Improving validation losses and accuracy for 3D CNN

I have used a 3D CNN architecture, for detecting the presence of a particular promoter (MGMT), by using FLAIR brain scans. (64 slices per patient). The output is supposed to be binary (0/1). I have ...
user avatar
  • 121
1 vote
1 answer
101 views

Do you need a terminal state when using double deep q networks?

I just got my agent training, and I'm wondering if the terminal flags are necessary when sampling from the replay buffer. The game I'm implementing the agent in has two different ways the game can end,...
user avatar
0 votes
0 answers
31 views

Training a neural network using several data sources with quality flags

I have been searching for a specific problem in training a NN and hope someone is able and willing to help as I cannot find a solution. The problems is that I have a spatial data set with 3 sources of ...
user avatar
1 vote
1 answer
81 views

What could cause the hamming loss and subset accuracy to get stuck in a multi-label image classification problem?

I am rather new to deep learning and got some questions on performing a multi-label image classification task with keras convolutional neural networks. Those are mainly referring to evaluating keras ...
user avatar
  • 11
0 votes
0 answers
68 views

Data Augmentation for Object Detection - Polygon Region Shape

I'm looking to run a Mask RCNN code on my dataset of about 2700 images. The images are too large and I would like to resize them, and I would also like to add some shear, scale and zoom augmentations. ...
user avatar
0 votes
1 answer
37 views

How to handle random order of inputs and get same output?

I am a beginner with DL. I did some tutorials and I know the basics of TensorFlow. But I have a problem understanding how to construct more advanced NNs. Let's say I have 6 inputs and a list of 500 ...
user avatar
0 votes
0 answers
21 views

Is my understanding of RNNs wrong?

I asked a similar question a few days back here, but since no one replied, I thought I should subdivide my question further. My understanding of RNNs is as follows, Suppose I have a standard MLP. To ...
user avatar
0 votes
0 answers
27 views

Dealing with images of multivariate time series

Assuming we have the following input multivariate series: number_of_samples, number_of_timestamps, number_of_features Upon conversion to images using any of the ...
user avatar
  • 1
0 votes
1 answer
420 views

Transformer model is very slow and doesn't predict well

I created my first transformer model, after having worked so far with LSTMs. I created it for multivariate time series predictions - I have 10 different meteorological features (temperature, humidity, ...
user avatar
  • 103
1 vote
0 answers
181 views

What would be the advantage of making channel dimension first in TensorFlow Keras implementation?

I was reproducing the findings of a research article in which I discovered that they had switched the Channel dimension from last to first. To clarify this concept, I went through A Gentle ...
user avatar
0 votes
0 answers
29 views

LSTM predictions are one time step lagging

My problem involves electricity prediction (time-series problem) for 1-hour ahead. I am using LSTM to forecast. Length of Dataset: 1 year at one-hour interval Input: Outdoor Temperature (Ot), ...
user avatar
1 vote
1 answer
38 views

Are there any stats available on the usage of libraries by deep learning researchers?

I know three Python libraries that are popular in deep learning research community: Keras, PyTorch, Tensorflow. I don't know much about Theano. This question is not about the efficiency, flexibility ...
user avatar
  • 3,099
1 vote
0 answers
47 views

Would the reward normalization be wrong in early episodes?

It's confusing me that how can we normalize the reward without actually knowing the true mean and variance of the reward distribution, specifically, at the early steps and episodes. This may cause ...
user avatar
1 vote
1 answer
332 views

What is the proper way to process continuous sequence data, such as time-series, using the Transformer?

What is the right way to input continuous, temporal (time-series) data into the Transformer? Assume we're using the basic TransformerBlock here. Since data is continuous with no tokens, Token ...
user avatar
0 votes
0 answers
34 views

Keras MLP performing better than Transformers

I'm working on a comparative study using some models in a sentiment analysis task: MLPs and LSTMs with and without the use of word embeddings (GloVe and Word2Vec) and two Transformer-based models (...
user avatar
0 votes
1 answer
71 views

Confusion about faster RCNN neither object nor background label

I am trying to construct a faster RCNN from scratch using KERAS. I am generating the tensor which contains whether anchor at each location corresponds to object or background or neither for training ...
user avatar
0 votes
0 answers
88 views

What do RNN, LSTM, and GRU layers do in Tensorflow?

I have gone through some theoretical introductions of RNN and LSTM, which do not contain any code, and they describe in fair detail what the cells do, how they apply operations like forget, sigmoid, ...
user avatar
  • 101
0 votes
1 answer
238 views

Validation accuracy very low with transfer learning

I am using MobileNetV3 from TF keras for doing transfer learning; I removed the last layer, added two dense layers, and trained for 20 epochs. How many dense layers should I add after the MobileNet ...
user avatar
1 vote
0 answers
20 views

Neural Network Regression Experiment Going Wrong

I've been trying to get a simple regression experiment going with a neural network and I would like some help interpreting what is going wrong. My goal is to see what level of regression accuracy I ...
user avatar
1 vote
0 answers
36 views

Pixel values of segmap in multi-class semantic segmentation

I'm preparing a dataset for a multiclass semantic segmentation using U-Net like architecture. To be precise, I've got it ready but a question came to my mind. How does pixel values of a segmentation ...
user avatar
  • 11
1 vote
1 answer
136 views

Number of parameters in Keras/Tensorflow Dense layers [closed]

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 ...
user avatar
  • 331
0 votes
0 answers
46 views

Are there any inverse RNN layers?

Given the model: Sequence([ GRU(200, input_shape=(None,100), return_sequences=False) ]) Which maps the space ...
user avatar
2 votes
1 answer
121 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 ...
user avatar
1 vote
0 answers
44 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: ...
user avatar
3 votes
2 answers
132 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 ...
user avatar
1 vote
3 answers
96 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 ...
user avatar
1 vote
2 answers
71 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)?
user avatar
2 votes
1 answer
66 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 ...
user avatar
0 votes
1 answer
66 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; ...
user avatar
  • 13
5 votes
0 answers
57 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 ...
user avatar
  • 171
1 vote
1 answer
221 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 ...
user avatar

1
2 3 4 5