Questions tagged [keras]

For questions related to Keras, the modular neural networks library written in Python

77 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6
votes
0answers
101 views

Why would you implement the position-wise feed-forward network of the transformer with convolution layers?

The Transformer model introduced in "Attention is all you need" by Vaswani et al. incorporates a so-called position-wise feed-forward network (FFN): In addition to attention sub-layers, each of the ...
5
votes
2answers
69 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 ...
4
votes
1answer
103 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....
3
votes
2answers
28 views

Using a neural network to identify a stable region within a set of data?

I am working on a problem in which I am attempting to find a stable region in a spiral galaxy. The PI I'm working with asked me to use machine learning as a tool to solve the problem. I have created ...
3
votes
0answers
41 views

Deep Q-Learning agent poor performing actions. Need help optimizing

I'm trying to make deep q-learning agent from https://keon.io/deep-q-learning My environment looks like this: https://imgur.com/a/OnbiCtV As you can see my agent is a circle and there is one gray ...
3
votes
0answers
123 views

YOLO v3 complete architecture

I am attempting to implement YOLO v3 in Tensorflow-Keras from scratch, with the aim of training my own model on a custom dataset. By that, I mean without using pretrained weights. I have gone through ...
2
votes
0answers
42 views

Which deep neural networks are appropriate for the detection of bombs?

This is a follow-up question from my previous post here about explosion detection. I gathered a dataset of explosions. As I'm new to Deep Learning in Keras, I'm trying to see what architecture best ...
2
votes
0answers
54 views

How can I increase the speed and performance of my implementation of an AI for Reversi?

I made an AI for Reversi, aka Othello (8×8), like Alpha Zero, using this book. This book is written in Japanese. The source code of the AI I implemented can be found in this Github repository. There ...
2
votes
1answer
81 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 ...
2
votes
0answers
31 views

how to use Softmax action selection algorithm in atari-like game

I'm currently writing a program using keras (python 3) to play a game similar to Atari games, only in this one there are objects moving in the screen in different angles and directions (in most of ...
2
votes
0answers
16 views

L1 Reguarizer in Keras model throwing weight matrix dimension error

Was just experimenting with something when i ran into this error : I am getting matrix dimension errors only when i use L1 Regularizer. I have checked and the regularizer itself doesn't change the ...
2
votes
0answers
40 views

Understanding CNN+LSTM concept with attention and need help

I have a question about the context of CNN and LSTM. I have trained a CNN network for image classification. However, I would like to combine it with LSTM for visualizing the attention weights. So, I ...
2
votes
0answers
40 views

Paper & code for “unsupervised domain adaptation” for regression task

Does anyone know a paper or code that does "unsupervised domain adaptation" for regression task? I saw most of the papers were benchmarked on classification tasks, not regression. I want to do ...
2
votes
0answers
16 views

In addition to matrix algebra, can GPU's also handle the various Kernel functions for Neural Networks?

I've read a number of articles on how GPUs can speed up matrix algebra calculations, but I'm wondering how calculations are performed when one uses various kernel functions in a neural network. If ...
2
votes
0answers
17 views

Binary classification for a series of data (using Keras) to tell if it is a straight line or not a straight line

I am new to machine learning and I would like to seek some advice/help for directions on implementing a binary classification for a series of data and tell if it is a straight line or a not? for ...
2
votes
0answers
38 views

Difference between retraining on different portions of data and training initially on larger data set

I have a large data set that doesn't fit in memory and would have to use something like Keras's model.fit_generator if I would like to train the model on all of the ...
2
votes
0answers
34 views

Autoencoder why it is special for image decoding?

I have read about auto encoder. Understood what is encoding part, and decoding part, and the latent space. Now, i tried to implement this in keras. Below is the code. ...
2
votes
0answers
61 views

Mapping Actions to the Output Layer in Keras Model for a Board Game

I have created a game based on this game here. I am attempting to use Deep Q Learning to do this, and this is my first foray into Neural networks (please be gentle!!) I am trying to create a NN that ...
2
votes
1answer
388 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 ...
2
votes
0answers
167 views

Deep NN architecture for predicting a matrix from two matrices

Recently my friend asked me a question: having two input matrices X and Y (each size NxD) where D >> N, and ground truth matrix Z of size DxD, what deep architecture shall I use to learn a deep model ...
2
votes
0answers
316 views

CNN attention maps on non-images

My datasets are not actual images, so using methods with ImageDataGenerator or pre-trained networks might not apply in this case. Data Structure: Each "image" is a 2048-long vector that has float ...
1
vote
0answers
19 views

Applying Machine Learning to 2D Laser Scanner Data

We are using 2D Laser Scanner to scan various objects of different geometric shapes for e.g. cylinder, spiked, cylinder with notch, cylinder with curved edges e.t.c. The dataset contains points in the ...
1
vote
0answers
28 views

How to perform regression with multiple numeric (positive and negative) inputs and one numeric output?

I have a dataset with different types of numerical values (both negative and positive numerical values) for the inputs (for example, -40, -35, 1, 25, 39, etc., that is, multiple inputs) and single ...
1
vote
0answers
7 views

Keras correlation coefficient as network metric in R

does anyone know how to use the correlation coefficient or squared correlation coefficient as a metric in keras in R (although other languages may provide clues). This is for a CNN that functions ...
1
vote
0answers
22 views

How to change the architecture of my simple sequential model

I'm new to Deep Learning with Keras. With some tutorials online for cat vs non-cat classification, I was able to compile this simple architecture for my own ...
1
vote
1answer
13 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
0answers
19 views

How to implement CNN with variable number of images in tensorflow or keras?

Suppose I have a problem where I want to classify the color of LEDs seen in the image. I can use OpenCV to pinpoint the exact location of these LEDs but I do not know their color for sure because the ...
1
vote
1answer
63 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
0answers
24 views

How to get same accuracy with identical models in Keras and Tensorflow?

As we all know Keras backend uses Tensorflow and so it should give out same kind of results when we provide same parameters, hyper-parameters, weights and biases initialisation at each layer, but ...
1
vote
0answers
38 views

What are the possible neural network architecture for linear regression or time series regression?

I started modeling a linear regression problem using dense layers (layers.dense), which works fine. I am really excited, and now I am trying to model a time series linear regression problem using CNN, ...
1
vote
0answers
20 views

i have trained my model & now trying to predict but unable to do using keras

i have trained my model & now trying to predict but unable to do please help. trying to predict cat or dog stuck in "prediction" ...
1
vote
0answers
52 views

Can I perform image recognition using a very small dataset?

I have 3 types of classes and I have 2 images of each object (or class). Can I perform image recognition using this very small dataset?
1
vote
0answers
18 views

Issues related to RoI Pooling in keras

I am trying to do RoI pooling of an image whose RoI bounding box coordinates are known to me. Can anyone provide me the code for doing the same? I have read many repositories but I didn't get any ...
1
vote
0answers
36 views

Keras CRNN implementation with multiple input images

Hello I am trying to implement a CRNN with multiple input images (in my context it is 6 images) This is a regression problem and output is two real value. And for the CNN block I am thinking of using ...
1
vote
0answers
80 views

Gym dict space as keras DQN agent input

I'm trying to make an AI to play my own card game. I have an OpenAI gym for the game with Dict as an observation space. It is nested dict, so I can't easily replace it with a tuple. I want to pass ...
1
vote
0answers
36 views

Simple weakly supervised Object localizetion using keras. How to visualize the results?

I am following this link : Weakly-supervised-object-localization to create heatmap of the region in an image where the CNN looks to identify the class. As per the above mentioned repository , ...
1
vote
0answers
93 views

Policy gradient loss for neural network training

Say i want to train a neural network with 10 classes as outputs and use categorical_cross_entropy as a loss function in keras. This will try to fit the training ...
1
vote
0answers
31 views

how to add the pool4 to the 2 x conv7 in FCN-16s using keras?

Now I'm using tensorflow.keras to implement the FCN-16s, this picture may be different with others, you should focus this it add ...
1
vote
1answer
98 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 ...
1
vote
0answers
79 views

How can VAE have near perfect reconstruction but still output junk when using random noise input

I am creating a VAE for time series data using CNNs. The data has 4800 timesteps and 4 features. It is standardized and normalized. The network I am using is implemented in Keras as follows. I have ...
1
vote
0answers
25 views

Kera's (normal) LSTM uses the GPU?

I'm running Kera's LSTM (not CuDNNLSTM) but I notice my GPU is under load. I need recurrent dropout, so I can only stick with <...
1
vote
0answers
35 views

how to estimate which item is bought most using AI

Problem: Maintaining the products is a big task for a retailer. If we can estimate using AI to predict which products will sell the most, we can maintain sufficient stocks of the product without ...
1
vote
1answer
149 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
1answer
103 views

Difficulty understanding Keras LSTM fitting data

I'm try to train a RNN with a chunk of audio data, where X and Y are two audio channels loaded into numpy arrays. The objective is to experiment with different NN designs to train them to transform ...
1
vote
0answers
782 views

NEAT + Keras : reproducibility problem (World Models implementation)

I'm trying to apply the World Models architecture to the Sonic game (using the gym-retro library). My problem concerns the evolutionnary algorithm part that I use as the controller (worldmodels = ...
1
vote
0answers
26 views

Sequence to sequence machine learning / NMT - converting numbers into words

I want to do some sequence to sequence modelling on source data that looks like this: /-0.013428/-0.124969/-0.13435/0.008087/-0.269241/-0.36849/ with target data ...
1
vote
0answers
29 views

Does it make sense to add word embeddings as additional features for LSTM model?

I have an LSTM model. This model takes as input tokens. Those tokens represent XML markups extracted from some XML files. My model is working fine. However, I want to optimize it by adding word ...
1
vote
0answers
222 views

How To Improve This Sentiment Analysis Model

A.I Community, this is my first post on here I am currently reading, learning and designing models. At the moment I'm working on this sentiment analysis tool; from what I gather sentiment analysis can ...
1
vote
0answers
113 views

Questions regarding keras activation maximization visualization

I wanted to use the visualization of the activation maximization of the filters that is described in the following keras tutorial/blog: https://blog.keras.io/how-convolutional-neural-networks-see-the-...
1
vote
0answers
295 views

How does backpropagation work on a custom loss function whose components have magnitudes of different orders?

I want to use a custom loss function which is a weighted combination of l1 and DSSIM losses. The DSSIM loss is limited between 0 and 0.5 where as the l1 loss can be orders of magnitude greater and is ...