Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [keras]

Highly modular neural networks library written in Python, capable of running either TensorFlow or Theano.

1
vote
0answers
9 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 ...
-1
votes
0answers
12 views

Data augmentation with ImageDataGenerator in Keras - Python

I have tried to use imageDataGenerator for data augmentation for following cnn wich i need to train for 5 different image classes. When i run this code, following error occurred. "Traceback (most ...
0
votes
0answers
18 views

Problem installing autokeras and elephas using Anaconda and pip

I am trying to install autokeras and elephas using Anaconda and pip, so that it can be used in a Jupyter notebook. However, using simply pip install autokeras ...
-1
votes
1answer
23 views

model.predict in Keras, Python error

I trained a model in Keras with input dimension 15 and output dimension 1. Then I tried to predict the output for a single input np.array, which I chose to be a toy example np.arange(15). However, the ...
4
votes
1answer
27 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....
-1
votes
1answer
24 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; ...
2
votes
1answer
44 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
20 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
24 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. ...
0
votes
0answers
11 views

Sequentia data with static data (gender, group, Major) in RNN model (LSTM)

I have a sequential dataset and I built an LSTM model using Keras for prediction accuracy. I would like to add static data ( i.e. gender, blood group, major) to the sequential data. I found a paper (...
0
votes
0answers
18 views

How does keras handle subfolders [migrated]

I am going to train a network to label a given image whether it belongs to category A or category B (a binary classifier). I use flow_from_directory to generate ...
0
votes
1answer
22 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. ...
0
votes
0answers
13 views

ever stable loss - basic keras model

what is wrong with this simple model? While learning to build keras models. input: x output: x+2 https://colab.research.google.com/drive/177hIdbn5K0mZDayqBdA9Q7OW5SrBPLAh
2
votes
0answers
28 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
1answer
57 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 ...
1
vote
0answers
25 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
29 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 ...
1
vote
0answers
20 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
73 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
0answers
16 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
20 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 ...
3
votes
2answers
434 views

Can LSTM Nets be speed up by GPU?

I am training LSTM Nets with Keras on a small mobile GPU. The speed on GPU is slower then on CPU. I found some articles that say that it is hard to train LSTMs (RNNs) on GPUs because the training ...
0
votes
0answers
45 views

reinforcement learning rmsprop does not improve, average reward through time oscillates

I have a reinforcement learning project using policy gradient method with rmsprop optimization. (used vanilla REINFORCE algorithm)(the game is a simple pong game in open-ai gym atari environment) the ...
3
votes
2answers
36 views

How should my output layer activate for a sequence to sequence LSTM model with word2vec output

I'm having trouble grasping how to output word vectors from an LSTM model. I'm seeing many examples using a softmax activation function on the output, but for that I would need to output one hot ...
0
votes
1answer
87 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
0answers
106 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 ...
2
votes
1answer
124 views

Mountain car problem with images - not converging

I'm trying to find the optimal policy for the mountain car problem using deep Q learning with images as input, however, I cannot find a way to get my Q function to give me good solutions (I followed ...
3
votes
1answer
112 views

Over- and underestimations of the lowest and highest values in LSTM network

I'm training a LSTM network with multiple inputs and several LSTM layers in order to setup a time series gap filling procedure. The LSTM is trained bidirectionally with "tanh" activation on the ...
1
vote
0answers
31 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-...
4
votes
2answers
47 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 ...
-1
votes
1answer
239 views

Simple Image Processing AI for Fire Detection

I have absolutely no experience with any kind of AI and really want to create this: A program that can train on a set of images to determine if an image is showing a fire flame or not (for fire ...
1
vote
0answers
157 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 ...
0
votes
0answers
73 views

Training with unbalanced positive *and negative* data

I am interested in using Keras / Tensorflow to self-train a neural net how to behave in a random environment with real-time feedback from a series of sensors. That probably sounded confusing, so let ...
0
votes
1answer
79 views

What dimension to give to a neural network intputs?

I want to learn a policy network for a Domineering game For each position I have to recall the input (i.e. the board, the flipped board, and the turn) and the output of the same size as the board ...
1
vote
1answer
167 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
71 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 ...
0
votes
0answers
15 views

Keras: Using different variables for each element in a batch

I'm currently trying to implement a convolutional neural network with Keras. My main aim is to generate 3D models from 2D images. For this I have implemented a neural network which includes a ...
0
votes
1answer
366 views

L2 normalization in Facenet paper acting as a Constraint?

In the Facenet paper, Under section 3.2 The authors mention that: The embedding is represented by f(x) ∈ Rd . It embeds an image x into a d-dimensional Euclidean space. Additionally, we constrain ...
1
vote
0answers
28 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 ...
0
votes
0answers
120 views

Conv2Conv Autoencoder for text sequences

Training a Conv2Conv autoencoder for the purpose of text clustering, with parameters fixed as following: ...
2
votes
1answer
103 views

Keras pattern finding between hash and word

My goal is to build a neural net that can find patterns between a hash and a word on it's own. So that it returns the word of any hash that I will input. Unfortunatally my skill in the area of ...
1
vote
0answers
129 views

Transfer learning from model trained in a similar dataset

I am currently working on a defect detection algorithm but I only have a few samples of defects.I googled for defect detection datasets and I found this one: http://resources.mpi-inf.mpg.de/...
0
votes
0answers
148 views

Error building CNN(ShallowNet) train module

while training the CNN(ShallowNet) with my own custom data with 4 classes but am getting this error on model.fit function: Traceback (most recent call last): File "train_network.py", line 98, ...
7
votes
1answer
104 views

Why does 'loss' change depending on the number of epochs chosen?

I am using Keras to train different NN. I would like to know why if I increment the epochs in 1, the result until the new epoch is not the same. I am using shuffle=False, and np.random.seed(2017), and ...
-1
votes
1answer
239 views

Problems trying to predict a categorical variable in keras

I am using the following, fairly simple code to predict an output variable which may have 3 categories: ...
0
votes
0answers
262 views

Giving input list to model API in keras

I have tried following to create layers and give it to Model in order to create a network. ...
4
votes
1answer
528 views

Training Custom object detection network using tensor-flow object detection API?

I was just wondering if some one could provide a nice tutorial on how to use the Recent tensor-flow object detection API to train custom network say like VGG-16? (Just USE the VGG-16, VGG-19, ...
1
vote
0answers
180 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 ...
0
votes
3answers
511 views

Ensemble Learning using Convolutional Neural Networks

I have created 22 different Convolutional neural networks that all test for the presence of unique objects in an image (each one of the classifiers is unique). Each sample in the test set has the ...
2
votes
1answer
360 views

Q Learning Algorithm not converging

I am trying to run Deep Q-learning algorithm on a game which i made in python using pygame library. The algorithm accepts the game screen (4 frames) as input to neural network which used as the ...