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
2
votes
2answers
32 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 ...
0
votes
0answers
15 views

Which model should I use?

I want to create something like a recommendation system based on tensorflow/keras. Initially the system will have some arbitrary (random or user-chosen) inputs and generate some image based on those ...
1
vote
1answer
25 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,...
0
votes
0answers
6 views

Could not compute output KerasTensor in multi modal seq2seq [migrated]

I am trying to generate comments from subreddit posts using images, titles, and source subreddit of the post. if you don't know what a subreddit is, just think about it as a category of the post e.g ...
0
votes
0answers
24 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 ...
1
vote
1answer
36 views

Keras CNN: Multi Label Classification of Images - Model Evaluation

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 ...
0
votes
0answers
7 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. ...
0
votes
1answer
25 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 ...
0
votes
0answers
16 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 ...
0
votes
0answers
16 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 ...
0
votes
1answer
66 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, ...
0
votes
0answers
25 views

Does Adam remember gradient momentum from previous fits, or this only works for batches?

I am training my model in loop using tensorflow and keras, iterating over data etc. Simple example ...
1
vote
0answers
33 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 ...
0
votes
0answers
10 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), ...
1
vote
1answer
28 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
21 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
27 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
58 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
22 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
50 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 ...
1
vote
1answer
63 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
46 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
16 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
42 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
39 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
22 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
43 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
46 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
26 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
58 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
31 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
64 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
32 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
66 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
32 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
50 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
219 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
61 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
24 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
38 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
26 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
95 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
2 3 4 5 6