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.

127 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
1answer
225 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
0answers
33 views

Could zero-padding affect learning in a negative way?

I implemented an LSTM with Keras to perform word ordering task (given a syntactically unordered sentence, the goal is to label ...
3
votes
1answer
237 views

Adding a dense layer after a conv2d layer in a convolutional autoencoder

I am trying to implement a convolutional autoencoder with a dense layer at the bottleneck do to some dimensional reduction. I have seen two approaches for this which arent particularly scalable. The ...
3
votes
0answers
104 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 ...
3
votes
0answers
19 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 ...
3
votes
0answers
49 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
213 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 ...
3
votes
1answer
501 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 ...
3
votes
1answer
358 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 ...
2
votes
0answers
43 views

Inaccurate masks with Mask-RCNN: Stairs effect and sudden stops

I've been using matterport's Mask R-CNN to train on a custom dataset. However, there seem to be some parameters that i failed to correctly define because on practically all of the images, the bottom ...
2
votes
0answers
32 views

How can I train a Deep Learning model using degraded photos and their clean version to correct photos

I have 5000 degraded pictures ( pixelated, blurry, too much luminosity ... ) and their clean versions, and I would like to train a model so that it can predict how to correct future pictures. I've ...
2
votes
0answers
91 views

Is it possible to use entity embedding with autoencoder for anomaly detetction?

I'm trying to build autoencoder in keras in order to detect anomalies. However, most of the data is categorical and I have to encode it. When it comes to production, categorical features can take new ...
2
votes
0answers
24 views

Can't figure out what's going wrong with my dataset construction for multivariate regression

TL;DR: I can't figure out why my neural network wont give me a sensible output. I assume it's something to do with how I'm presenting the input data to it but I have no idea how to fix it. Background:...
2
votes
0answers
25 views

How are batch statistics computed in Recurrent Batch Normalization?

I'm implementing recurrent BN per this paper in Keras, but looking at it and those citing it, a detail remains unclear to me: how are batch statistics computed? Authors omit explicit clarification, ...
2
votes
1answer
38 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 ...
2
votes
0answers
44 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
1answer
108 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
121 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
108 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, ...
2
votes
0answers
99 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
105 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
213 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 ...
2
votes
0answers
17 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
20 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
41 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
1answer
321 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 ...
2
votes
1answer
282 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 ...
2
votes
0answers
37 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
88 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
0answers
32 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 ...
2
votes
0answers
232 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
377 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
1answer
14 views

Autoencoder: predictions missing for nodes in the bottleneck layer

I'm using tf.Keras to build a deep-fully connected autoencoder. My input dataset is a dataframe with shape (19947,), and the purpose of the autoencoder is to predict normalized gene expression values. ...
1
vote
0answers
85 views

How should I build this DQN agent?

I have a set of users that can be one of 3 types. They will randomly request a service from the UAV which is a drone used as a Base Station. The UAV (the agent) is tasked with allocating subchannels (...
1
vote
0answers
16 views

Loss function decays linearly in segmentation MRI fascia

I am working on a segmentation of MRI images of the thigh. I am trying to segment the fascia, there is a slight imbalance between the background and the mask. I have about 1400 images from 30 patients ...
1
vote
0answers
40 views

How to design my Neural Network for Game AI

For my school project, I have to develop an agent to play my game. The base I have is a 'GameManager' which call 2 AIs, each taking a random move to do. To make my AI perform, I decided to make a ...
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 ...
1
vote
0answers
32 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 ...
1
vote
0answers
24 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 ...
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 ...
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 ...
1
vote
1answer
85 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
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 ...
1
vote
0answers
22 views

Is using a filter of size (1, x, y) on a 3D convolutional layer the same as using a filter of size (x,y) on a 2D convolutional layer?

I'm trying to predict some properties of videos with Keras using the following rough architecture: Feed each frame through the same 2-D convolutional layer. Take the outputs of this 2-D ...
1
vote
0answers
141 views

What are the actual math or computer science concepts behind these unfamiliar hyperparameters in the Deep Dream Generator's Deep Style?

I've been playing around with neural style transfer for a about a year now, and I've been doing it with two general approaches. The first has been using a script that is available on the Keras GitHub, ...
1
vote
0answers
30 views

NN for card game evaluation function

I've written an Monte Carlo Tree Search player for the game of Castle (AKA Shithead, Shed, Palace...). I have set this MCTS player to play against a basic rule based AI for ~30000 games and collected ~...
1
vote
0answers
47 views

Neural Network Results always the same

I have a GRU model which has 12 features as inputs and I'm trying to predict output power. I really do not understand though whether I choose 1 layer or 5 layers 50 neurons or 512 neuron 10 epochs ...
1
vote
0answers
41 views

How to deal with features which are here just for training?

I'm new to the Data Science field and last week I started to learn about Neural Networks and Deep Learning. To practice, I decided to do a small project: design a Neural Network to predict the winner ...
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 ...
1
vote
1answer
98 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 ...