The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [keras]

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

Filter by
Sorted by
Tagged with
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 ...
0
votes
0answers
61 views

train loss does not convergence

I am using Keras 2.07, with Python 3.5, Tensorflow 1.3.0 on Windows 10 I am testing the architecture used in paper intra prediction using fully connected network for video coding. I hope to use it ...
1
vote
1answer
30 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
votes
1answer
45 views

Error using Keras clear_session while multiple calibration

I am working through the tutorial here. I just cleaned up the code for myself but other than that code is as in original tutorial. I am using the pollution data from the following link When I try to ...
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 ...
0
votes
1answer
67 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
73 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 ...
0
votes
1answer
56 views

How can I suppress a CNN’s translation invariant or translation equivariant?

I am trying to understand this post, but I get confused by the definitions and the differences. What's definition of equivariant? If I remove all the pooling layers from a CNN, will it make the ...
1
vote
0answers
28 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
70 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 ...
2
votes
1answer
30 views

how to benefit from previous training weights in training again to increase accuracy?

I have trained a modified VGG classification CNN, with random initialized weights; therefor the validation accuracy was not high enough for me to accept (around 66%). now using the weights resulted ...
2
votes
2answers
93 views

How important is it that the generator of a generative adversarial network doesn't take in information about input classes?

I'm building a generative adversarial network that generates images based on an input image. From the literature I've read on GANs, it seems that the generator takes in a random variable and uses it ...
3
votes
0answers
39 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 ...
4
votes
2answers
87 views

Can DQN perform better than Double DQN?

I'm training both kind of agents against an environment but DQN performs significantly better than Double DQN. As I've saw here, Double DQN use to perform better than DQN. Am I doing something wrong ...
1
vote
0answers
28 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
163 views

How to implement word2vec using Tensorflow 2.0 keras API?

Since Keras API as defined as layers, how would it be used to implement the word2vec?
0
votes
0answers
117 views

Policy gradient in keras predicts only one action

I have trouble with the REINFORCE algorithm in keras with Atari games. After round about 30 episodes the network converges to one action. But the same algorithm is working with CartPole-v1 and ...
3
votes
0answers
83 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 ...
0
votes
0answers
53 views
1
vote
1answer
57 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 '...
0
votes
0answers
45 views

Extend Gym Environment for recommendation with kerasRL and some questions

I want to make a simple recommendation system based on reinforcement learning using kerasRL and OpenAI Gym. My point is that I'...
1
vote
1answer
73 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
2answers
96 views

Loss function spikes

For the UNSW-NB15 dataset i receive spikes in the loss function during training. The algorithms see part of this UNSW dataset a single time. Loss function is plotted after every batch. For other ...
2
votes
1answer
137 views

Text classification task chatbot

I'm building a customer assistant chatbot in Python, so a text classification task, and I have available more or less 7 hundred sentences of average length 15 words (unbalanced class). What do you ...
1
vote
0answers
69 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
24 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 ...
-3
votes
2answers
87 views

Keras simple CNN not learning [closed]

I was trying to write a simple CNN in keras during a course, and I wrote one that does not learn at all, but I don't understand why. Don't bother about the coding, first I load two images of a dog ...
2
votes
2answers
60 views

Will a neural network always predict the correct label if it sees the exact same input during training and testing?

If I'm performing a text classification task using a model built in Keras, and for example, am attempting to predict the appropriate tag given a Stack Overflow question: "how to subtract 1 from an ...
2
votes
1answer
265 views

Dice loss gives binary output whereas binary crossentropy produces probability output map

On recommendation of Kanak on stackoverflow I am posting this question here: Currently I am experimenting with various loss functions and optimizers for my binary image segmentation problem. The loss ...
0
votes
1answer
123 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
144 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 ...
0
votes
1answer
69 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: ...
0
votes
2answers
277 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 ...
0
votes
1answer
167 views

Label arrangement for custom Keras image generator

I am trying to generate 90 and 270 degrees rotated versions of my sample images on the fly during training. I found an example and modifying it. But I am confused about what should be the order? For ...
1
vote
1answer
50 views

How to solve the AttributeError: 'Ssd' object has no attribute 'freeze_batchnorm' [closed]

I use a modified training script for modeling images with Tensorflow/Keras/Mobilenet_V2. After a few errors that I could solve I now get the following error: ...
1
vote
1answer
299 views

Deep Q-Learning poor convergence on Stochastic Environment

I'm trying to implement a Deep Q-network in Keras/TF that learns to play Minesweeper (our stochastic environment). I have noticed that the agent learns to play the game pretty well with both small and ...
5
votes
1answer
806 views

Putting constraints on output of deep neural network

I am training a deep neural network. There is a constraint on an output value of the network. (e.g. Output has to be between 0 and 180) I think some possible solutions are using sigmoid,tanh ...
4
votes
1answer
95 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
51 views

Number of units of the last layer

I am preparing a binary classifier. Initially I used the the following parameters based on the well known cat and dog classifier example; ...
1
vote
1answer
101 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
710 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
2answers
2k views

Keras : get back labels from a model

I have a saved keras model. How can I get back the labels from the model ? Because right now, I can use the predict method to get back the probability for a sample to belong to a certain class e.g. ...
1
vote
1answer
99 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. ...
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. ...
1
vote
1answer
66 views

Why would giving my AI more data make it perform worse?

So I trained an AI to generate shakespeare, which it did somewhat well. I used this 10,000 character sample. Next I tried to get it to generate limericks using these 100,000 limericks. It generated ...
2
votes
0answers
59 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 ...
0
votes
2answers
53 views

CNN Pooling layers unhelpful when location important?

I'm trying to use a CNN to analyse statistical images. These images are not 'natural' images (cats, dogs, etc) but images generated by visualising a dataset. The idea is that these datasets hopefully ...
3
votes
1answer
256 views

Convolutional Layers on a hexagonal grid in Keras

Keras' convolutional and deconvolutional layers are designed for square grids. Is there was a way to adapt them for use in hexagonal grids? For example, if we were using axial coordinates, the input ...
0
votes
1answer
75 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) ...