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
19 views

Different predictions across DL Frameworks [closed]

Can anyone give me a reason as to why I can train a neural network in say Tensorflow Flow, build equivalent models in pytorch and keras and any other DL framework, load the weights from the tensorflow ...
2
votes
2answers
216 views

How to tell a neural network that: “your i-th input is special”

Assume that I have a fully connected network that takes in a vector containing 1025 elements. First 1024 elements are related to ...
2
votes
2answers
122 views

What is the need for so many filters in a CNN?

Consider the following coding line related to CNNS Conv2D(64, (3,3), strides=(2, 2), padding='same') It is a convolution layer with filter size $3 \times 3$ and ...
0
votes
1answer
28 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: ...
2
votes
1answer
32 views

Evaluate model multiple times in loss function? Is this reinforcement learning?

I am interested in models that exhibit behavior. My goal is a model that survives indefinitely on a two dimensional resource landscape. One dimension represents the location (0 to 1) and the second ...
-1
votes
0answers
22 views

Keras autoencoder is not reconstructing 1D signals

I would like to train an autoencoder neural network. Assume I have a 1D signal: Then in order to create a dataset, I split this signal into several thousands of (overlapping) segments (each with 1024 ...
0
votes
1answer
23 views

Image Classification for watermarks with poor results

Just starting learning things about tensorflow and NN. As an exercise I decided to create a dataset of images, watermarked and not, in order to binary classify these. First of all, the dataset ( you ...
0
votes
0answers
23 views

Pytorch and keras ddqn seem identical, only keras learns

I followed a tutorial for ddqn to beat pong, it beats it with a perfect score in keras, but trying to translate it to pytorch it doesn't learn at all. What am I missing? I pasted all the code for each ...
0
votes
0answers
25 views

How to make a CNN/RNN on a non-binary dataset?

I am using TensorFlow + Keras to make a CNN/RNN. I'm quite new to AI, I've only made a few relatively basic networks for image regression/classification. The end goal of my project is to determine the ...
0
votes
1answer
32 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 ...
1
vote
2answers
132 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
vote
1answer
54 views

not sure if fine-tuned network is finely-tuned

I am practicing with Resnet50 fine tuning for binary classification task, here is my code snippet. ...
-1
votes
0answers
21 views

How do I split test and train data in gait recognition(or Face recognition)?

I am trying to implement gait recognition with Keras, I have a Gait-dataset and I was wondering how I would be able to handling and split the data frame into two samples (80%-20%) for training and ...
1
vote
2answers
35 views

Heavily mixing signal differentiation from Open Set of backgrounds via CNN

To whomever can help out, I appreciate it. I am currently attempting to detect a signal from background noise. The signal is pretty well known but the background has a lotttt of variability. I've ...
5
votes
1answer
216 views

What are the ways to calculate the error rate of a deep Convolutional Neural Network, when the network produces different results using the same data?

I am new to the object recognition community. Here I am asking about the broadly accepted ways to calculate the error rate of a deep CNN when the network produces different results using the same data....
2
votes
1answer
270 views

Should I apply ReLU to non negative output?

Suppose I want to predict the position of a sensor based on its reading. I can first predict the unit vector and predict the distance to be multiplied to this vector. And I know that distance will ...
1
vote
0answers
19 views

Duplicating calculations in CNN-LSTM architecture

I want to use frames from video game and analyze them using CNN and LSTM. But when I have the model defined like that ...
2
votes
1answer
311 views

How do I get multiple loss per sample in keras evaluate?

Usually, when I evaluate() a model, I would get a single loss that is already averaged over all samples. How do I get the loss per each sample and return all of them? E.g. if my dataset has 100 ...
0
votes
0answers
9 views
0
votes
1answer
855 views

What is the general procedure to create an AI system that can detect fire in images?

I have no experience with any kind of AI, but I really want to develop a system that can detect fire in images. I think I will need a labelled dataset with labels "fire" or "not fire&...
0
votes
1answer
73 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
1answer
40 views

Why does the output shape of a Dense layer contain a batch size?

I understand that the batch size is the number of examples you pass into the neural network (NN). If the batch size is 10, it means you feed the NN 10 examples at once. Assuming I have an NN with a ...
2
votes
1answer
25 views

Generation of 'new log probabilities' in continuous action space PPO

I have a conceptual question for you all that hopefully I can convey clearly. I am building an RL agent in Keras using continuous PPO to control a laser attached to a pan/tilt turret for target ...
6
votes
2answers
87 views

Two data classes for a convolutional neural network, can one have a LOT more images for training than the other?

I have two classes in the training set: one that has images with a feature and the other of images without that feature. Can there be a LOT more images with "no feature" so I can fit in all possible ...
0
votes
0answers
13 views

Why is the variance of my model predictions much smaller than the training data?

I trained a GRU model on some data and then created a bunch of predictions on a test set. The predictions are really bad, as indicated by a near zero R2 score. I notice that the variance of the model ...
1
vote
1answer
30 views

Why is the convolution layer called Conv2D?

When I build a convolution layer for image processing, the filter parameters should have 3 dimensions, (filter_length, filter_width, color_depth) is that correct? ...
3
votes
1answer
484 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
0answers
28 views

Using DDPG for control in multi-dimensional continuous action space?

I am relatively new to reinforcement learning, and I am trying to implement a reinforcement learning algorithm that can do continuous control in a custom environment. The state of the environment is ...
0
votes
1answer
46 views

Is a trained model in keras is saved with the weights for max accuracy?

Does a model trained in keras (tensorflow backend) saves the weights with max accuracy and minimum losses or does it simply saves the weights from the last epoch? If it is the latter then how do I ...
2
votes
1answer
33 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
67 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 ...
1
vote
0answers
19 views

Keras model accuracy not improving beyond threshold

I am currently working on a public project for the National Weather Model. We are experimenting with using a recurrent neural network to replace the output of a quadratic formula that is in use. The ...
2
votes
1answer
73 views

Understand the DDPG algorithm in Keras

I'm trying to understand the DDPG algorithm using Keras I found the site and started analyzing the code, I can't understand 2 things. The algorithm used to write the code presented on the page In the ...
0
votes
2answers
47 views

Is there a neural network that accepts both the current input and previous output?

I am quite new to neural networks. I am trying to implement in Python a neural network having only one hidden layer with $N$ neurons and $1$ output layer. The point is that I am analyzing time series ...
1
vote
1answer
79 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 ...
1
vote
1answer
42 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 ...
2
votes
1answer
103 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
99 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 ...
1
vote
1answer
101 views

Is there a car detection software written in Tensorflow or Keras with Python? [closed]

For a current project demo, I'm searching for a car detection neural network in Python written in TF/Keras (or any other type, as long as it has no C++ dependencies). Later on, I gonna write my own, ...
1
vote
0answers
55 views

What is the best way to make a deep reinforcement learning environment with a continuous 2D action space?

I understand that the actor-critic method is probably where I want to start because of how it works with continuous action spaces. However, the problem I am trying to solve would require the action be ...
0
votes
0answers
47 views

ConvNet - What to improve regarding architecture, procedure and technique?

I have a dataset of 180k images of license plates (so, not necessary to localize the license plate at first) for which I try to recognize the characters on the images (License plate recognition). All ...
0
votes
1answer
87 views

Which is better to start deep learning and understand it in depth (and not just a simple overview) - pytorch or tensorflow 2.0?

I am beginning to learn deep learning. I recently spoke with an expert in the field. He suggested that I start with pytorch because of these reasons: Keras abstracts the stuff a lot that we will not ...
1
vote
0answers
50 views

Embedding Layer into Convolution Layer

I'm looking to encode PDF documents for deep learning such that an image representation of the PDF refers to word embeddings instead of graphic data So I've indexed a relatively small vocabulary (88 ...
2
votes
2answers
69 views

How can I have the same input and output shape in an auto-encoder?

I'm building a denoising autoencoder. I want to have the same input and output shape image. This is my architecture: ...
1
vote
1answer
32 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,...
33
votes
6answers
9k views

Why do CNN's sometimes make highly confident mistakes, and how can one combat this problem?

I trained a simple CNN on the MNIST database of handwritten digits to 99% accuracy. I'm feeding in a bunch of handwritten digits, and non-digits from a document. I want the CNN to report errors, so I ...
1
vote
1answer
46 views

When would bias regularisation and activation regularisation be necessary?

For Keras on TensorFlow, a layer class constructor comes with these: kernel_regularizer=... bias_regularizer=... ...
0
votes
1answer
39 views

Number of LSTM layers needed to learn a certain number of sequences

Theoretically, number of units for a LSTM layer is the number of hidden states or the max length of sequences as per my practice. For example, in Keras: ...
0
votes
0answers
37 views

Micro average f1_score, None average f1_score cannot increase more than 0.71, 0.50 respectively for the best model estimator

I am training a multilabel text neural network and the model metric I chose, to measure the performance of the training and the validation sets, is the f1 score (Micro average, None average). However, ...
0
votes
0answers
38 views

CIFAR-10 can't get above 10% Accuracy with MobileNet, VGG16 and ResNet on Keras

I'm trying to train the most popular Models (mobileNet, VGG16, ResNet...) with the CIFAR10-dataset but the accuracy can't get above 9,9%. I want to do that with the completely model (include_top=True) ...

1
2 3 4 5