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
0
votes
0answers
33 views

Why are not results reproducible when a model is loaded with tf.keras.models.load_model? [closed]

This is how my training script looks like, only the important parts. ...
1
vote
1answer
18 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 ...
0
votes
0answers
11 views

Save the Embeddings Model from a Complete Triplet Loss Network

I am working on a Siamese Neural Network with custom Triplet Loss function. As far as I learned from the documentations, we will train a complete network but we want to save only the CNN that is used ...
1
vote
0answers
15 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 ...
0
votes
0answers
21 views

Does Keras or Tensorflow calculate backpropagation?

I am using tensorflow 2.1.0. Does Keras or Tensorflow calculate backpropagation? Where can I find the code for backpropagation in Keras and Tensorflow? Thanks, Jianqiao Huang
1
vote
1answer
22 views

Continuous sequence data with Transformer model

What is the right way to input continuous, temporal(time series) data into Transformer network. Assume we're using the basic TransformerBlock here. Since data is continuous with no tokens, Token ...
0
votes
0answers
20 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 (...
1
vote
0answers
35 views

What causes high differences in neural network accuracy each run?

I trained a CNN using Keras in R to multi-dimensional image data for image classification of five classes. I realized that each run (I retrained the network on the same data for ten times), although I ...
0
votes
0answers
16 views

How to manually optimize Neural Networks the most systematical way?

Do you have any ideas or guidance on how to do manual neural network optimization in the most systematic way? Especially when models train longer and the effects of hyperparameter fitting are very ...
0
votes
1answer
58 views

Can the developers of the libraries like TensorFlow have access to my dataset when I develop the model on my PC?

When I train a model with my dataset on my PC using Tensorflow, Keras, scikit-learn, Pandas or NumPy, do the developers of these libraries can gain access to my dataset? (May be when I train the model,...
0
votes
1answer
37 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 ...
0
votes
0answers
13 views

How to use Tensorflow Recommenders' Retrieval task with Keras data generators

I've recently started working with the package to build recommender systems, and so far, I've successfully built a Ranking task that takes the inputs from a Keras Data Generator. However, I could not ...
0
votes
0answers
37 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, ...
0
votes
1answer
26 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 ...
0
votes
0answers
19 views

Maximize delayed rewards

Given a Neural Network with a Dense(3) output and three actions: 'B' is [0, 0, 1] (= 1, for the sake of our example) 'N' is ...
1
vote
0answers
17 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 ...
1
vote
0answers
20 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 ...
0
votes
0answers
38 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
0answers
17 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
1answer
45 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
0answers
24 views

Are there any inverse RNN layers?

Given the model: Sequence([ GRU(200, input_shape=(None,100), return_sequences=False) ]) Which maps the space ...
2
votes
1answer
56 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
0answers
29 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: ...
3
votes
2answers
56 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 ...
0
votes
0answers
19 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 ...
1
vote
3answers
65 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
24 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
48 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
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
91 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
41 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
51 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
23 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 ...
1
vote
1answer
37 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 ...
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
68 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
0answers
34 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
109 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
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
0answers
32 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 ...
1
vote
1answer
35 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
73 views

What happens if there is no activation function in some layers of a neural network?

What if I don't apply an activation function on some layers in a neural network. How will it affect the model? Take for instance the following code snippet: ...
0
votes
0answers
127 views

How the parameters of decay_rate & decay_steps are taken into consideration while computing InverseTimeDecay()

During the last couple of days, I am experimenting with the different schedulers of learning rate decay offered by Keras (link here). Specifically, I have been using InverseTimeDecay: A ...
3
votes
0answers
36 views

Validation accuracy higher than training accurarcy

I implemented the unet in tensorflow for the segmentation of MRI images of the thigh. I noticed I always get a higher validation accuracy by a small gap, independently of the initial split. One ...
1
vote
0answers
35 views

Can I constrain my neurons in a neural network in according to the orders of the input?

I'm working with data that is ranked. So the inputs are 1,2,3 etc. This means the smaller numbers (ranks) are preferred to the larger ones. Hence the order is important. I want to estimate a number ...
1
vote
0answers
95 views

How to deal with KerasRL DDPG algorithm getting stuck in a local optima?

I am using KerasRL DDPG to try to learn a policy on my own custom environment, but the agent is stuck in a local optima although I am adding the OrnsteinUhlenbeck randomization process. I used the ...
0
votes
0answers
21 views

Network structure of generative model for classification

I'm trying to model a generative model for classification problem, especially aiming to solve an imbalanced data problem. However, I couldn't get intuitive understanding for generative classifier in ...
2
votes
0answers
23 views

Why does the loss stops reducing after a point in this Transformer Model?

Context I was making a Transformer Model to convert English Sentences to German Sentences. But the loss stops reducing after some time. Code ...
4
votes
1answer
43 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
2 3 4 5 6