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
1
vote
1answer
112 views

How do you manage negative rewards in policy gradient reinforcement learning?

The same basic question here, but 3 years old and no definitive answer: Negative reward (penalty) in policy gradient reinforcement learning The question is, if I'm doing policy gradient in keras, ...
1
vote
1answer
47 views

How can we print weights per iteration in a simple feed forward MLP for an specific class?

im working on a project in which I have to make a multi-layer perceptron with two hidden layers with 3 nodes in each. The target value in my data contains 8 unique values/classes. One of the tasks ...
1
vote
1answer
275 views

Create optimizer object using the tf.keras.optimizers.get function [closed]

I am trying to have the type of optimizer as a variable in the hyperparameter tuning phase. For that reason I am trying to use the tf.keras.optimizer.get function ...
1
vote
1answer
704 views

LSTM in reinforcement learning

Please tell me that is the LSTM network for the problem of reinforcement learning, as I explain to her what she will get the reward of a prediction, because the output will contain only actions? Well,...
1
vote
1answer
85 views

Deep Q Learning for Simple Game Not Effective

This is a follow-up question about one I asked earlier. The first question is here. Basically, I have a game where a paddle moves left and right to catch as much "food" as possible. Some food is good (...
1
vote
1answer
134 views

Entropy term in Proximal Policy Optimization (PPO) becomes undefined after few training epochs

I have implemented the total loss of my PPO objective as follows:- ...
1
vote
1answer
469 views

Reinforcement learning to play snake - network seems to not get trained at all

I am trying to build a network able to play snake game. This is my very first attempt to do such stuff. Unfortunately, I've stuck and even have no idea how to reason about the problem. I use ...
1
vote
1answer
175 views

Train and Test Accuracy of GRU network not increasing after 2nd epoch

So I´m currently implementing my first neural network using GRUs as a model and Keras as an implementation since it´s pretty highlevel. My problem is about the classification of 8 hour long timeseries ...
1
vote
1answer
267 views

Autoencoder for color images in Keras backed by MXNet

I need to train an autoencoder in Keras with the JPG images I took myself. ...
1
vote
1answer
228 views

Multi-label classification (e.g. as used in Keras) using DNN

I have data with about 100 numerical features and a multi-labelling that encodes ownership of a certain product (i.e. my labels are of the form $[x_i, i=1, \dots, n]$ where n is the number of products ...
1
vote
1answer
63 views

Why doesn't my image classification network get better with training?

I am attempting to train a network to do something I thought would be a relatively simple case to learn with: identify whether the back of a scanned vintage postcard has one of 'no postage stamp', a '...
1
vote
2answers
500 views

Why am I getting spikes in the values of the loss function during training?

I trained a neural network on the UNSW-NB15 dataset, but, during training, I am getting spikes in the loss function. The algorithms see part of this UNSW dataset a single time. The loss function is ...
1
vote
1answer
390 views

LSTM language model not working

I am trying to use a Keras LSTM neural network for character level language modelling. As the input, I give it the last 50 characters and it has to output the next one. It has 3 layers of 400 neurons ...
1
vote
1answer
89 views

How can I oppose two AI agents with keras / tensoflow?

I am trying to use tensorflow / keras to play a text based game. The game opposes two players that play by answering questions by choosing an answer among the proposed ones. Game resembles this: ...
1
vote
2answers
469 views

Keras giving memory allocation error and running extremely slow

I am working on character recognition using convolutional neural networks. I have 9 layer model and 19990 training data and 4470 test data. But when I am using keras with Tensorflow backend. When I ...
1
vote
1answer
164 views

Using a DQN with a variable amount of Valid Moves per turn for a Board Game

I have created a game on an 8x8 grid and there are 4 pieces which can move essentially like checkers pieces (Forward left or Forward right only). I have implemented a DQN in order to pull this off. ...
1
vote
1answer
79 views

Automatic prediction of whether a customer will come into the shop or not

So as my university project I am planning to make a prediction system as described in the title. My current idea is to use the age/gender classifier and run it on a video(taken in front of a shop) ...
1
vote
2answers
547 views

How to decrease accuracy from 99% to 80%~85% using keras for training a model

How do I decrease the accuracy value when training a model using Keras; which parameters can I change to decrease the value? My objective is not to actually decrease it, but just to know which ...
1
vote
1answer
42 views

Improving learning rate for classification task

I am trying to perform classification task using Keras and tensorflow. However, the learning converges after achieving an accuracy of 57%. All my inputs and outputs are categorical data. Am I using ...
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
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 ...
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 ...
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
49 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
42 views

Do correlations matter when building neural networks?

I am new to working with neural networks. However, I have built some linear regression models in the past. My question is, is it worth looking for features with a correlation to my target variable as ...
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
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
21 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
136 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
29 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
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
0answers
186 views

How can I deploy a Keras machine translation model on Flask or django [closed]

I want to deploy a machine translation system implemented in Keras on Flask. In which format do I have to save my model for flask? Is there a tutorial that shows how to deploy a Keras model on Flask?...
1
vote
0answers
27 views

Feed data into Keras LSTM layer [closed]

I'm trying to understand how to feed data into LSTM layer of Keras, but I'm in trouble and I don't understand how to do it. I've ...
1
vote
0answers
34 views

Training an unsupervised convolutional neural network to learn a general representation of a Lua module

I am trying to train a CNN in keras to learn a general representation of a Lua module, e.g. requires at the beginning, local variables, local functions, interface (returns) and in between some ...
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
30 views

Can tensorflow debugger debug a trained keras model during prediction?

I have a trained LSTM model created with keras. Is it possible to use tensorboard debugger or tensorflow debugger to debug the model during prediction runtime? Meaning that it steps through the model ...
1
vote
0answers
15 views

Standardize images using ImageDataGenerator in keras

I was trying to normalize my input data images for feeding to my convolutional neural network and wanted to use standardize my input data. I referred to this article: https://stackoverflow.com/...
1
vote
0answers
46 views

Are there any tools I can use to debug a Keras LSTM model during prediction?

I want to be able to debug my Keras LSTM model. For example, I want to be able to check the values of the input/output gates, cell states and hidden states at every time-step during prediction. Are ...
1
vote
0answers
50 views

What are the pros and cons of Keras, PyTorch and Caffe for computer vision?

I have tried to get the basic grasp of the following deep learning frameworks with python: Keras Pytorch Caffe However, I have lately noticed that people in the computer vision community care less ...
1
vote
0answers
23 views

Keras MLP returns always loss 0.0 [closed]

I'm implementing a multilayer perceptron with Keras to predict the correct words order in a sentence. I'm using train_on_batch()because I convert each sentence in a ...
1
vote
1answer
43 views

Hand-Signs Recognition using Deep Learning Convolutional Neural Networks

I am developing a CNN model to recognize 24 hand-signs of American Sign Language. I have 2500 Images/hand-sign. The data split is: Training = 1250 Images/hand-sign Validation = 625 Images/hand-sign ...
1
vote
0answers
102 views

Does this tutorial use normalization the right way?

There is this video on pythonprogramming.net that trains a network on the MNIST handwriting dataset. At ~9:15, the author explains that the data should be normalized. The normalization is done with ...
1
vote
0answers
15 views

Generation of realistic real-valued sequences using Wasserstein GAN fails

My goal is to generate artificial sequences of real-valued data (e.g. time series) with GANs. Starting simple I tried to generate realistic sine-waves using a Wasserstein GAN. But even on this simple ...
1
vote
0answers
13 views

How do I build a multi RNN network with keras?

I have 2 (independently long) sequences (a and b) of feature vectors that I want to use as input for a neural network. The idea was to build 2 GRU based encoders (one for each sequence). I would than ...
1
vote
0answers
28 views

How to use Before / After images to train a model

I am trying to create a model that can clean pictures of noise, blur, high luminosity etc, but I do not know how to do that. I have tried to search for it a lot, and I couldn't find anything that ...
1
vote
0answers
30 views

Reversing A Keras Dense GAN

I have a Keras GAN where every layer in the generator has more neurons than the last and also where they all have an activation of LeakyReLU(alpha=0.1). I am trying to map the image back to the noise ...
1
vote
0answers
339 views

Reasoning behind $Zero$ validation accuracy in the following ResNet50 model for classification

I have written this code to classify Cats and dogs using Resnet50. Actually while studying I came to the conclusion that Transfer learning gives very good accuracy for deep learning models, but I ...