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]

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

0
votes
0answers
20 views

improving tic tac toe model

For this tic tac toe model , how do I achieve the following model improvement for the original kaggle kernel ? -> Try using a deeper neural network, and trying different learning rates, to see if it ...
0
votes
2answers
27 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
26 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
0answers
6 views

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

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: ...
0
votes
0answers
11 views

Combining Two CNN's [migrated]

I Want to Combine Two CNN Into Just One In Keras, What I Mean Is that I Want The Neural Network To Take Two Images And Process Each One in Separate CNN, and Then Concatenate Them Together Into The ...
0
votes
0answers
29 views

How to train a stock trading neural network so that the 'profit' parameter is maximized?

I am watching some beginner level video training on neural networks using Tensorflow / Keras to get a better understanding of how they work and how to best implement them. I have some questions on ...
1
vote
1answer
42 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 ...
0
votes
0answers
9 views

What is the Significance of VGG16's Feature Dimensions?

I am using pre-trained VGG16 to extract features from small RGB images(299x299x3). I have successfully removed the top layer of the network to do this and have received features for each image that ...
4
votes
1answer
47 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
42 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
25 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
66 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
69 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
41 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
18 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
1answer
39 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
15 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
29 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
60 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
36 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
38 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
39 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
17 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
21 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 ...
4
votes
2answers
1k 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
55 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
45 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
116 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
135 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
171 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
152 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
52 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
50 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
312 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
171 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
81 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
118 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 ...
2
votes
1answer
208 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
84 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
18 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
527 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
31 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
194 views

Conv2Conv Autoencoder for text sequences

Training a Conv2Conv autoencoder for the purpose of text clustering, with parameters fixed as following: ...
2
votes
1answer
111 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
146 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
161 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
173 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
289 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
350 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. ...