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
297 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
763 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
86 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
103 views

Deep Q Learning Algorithm for Simple Python Game makes player stuck

I made a simple Python game. A screenshot is below: Basically, a paddle moves left and right catching particles. Some make you lose points while others make you gains points. This is my first Deep Q ...
1
vote
2answers
135 views

How to train a LSTM model with multi dimensional data

I am trying to train my model using LTSM layer in Keras (python). I have some problems regarding the data representation and feeding it into the model. My data is 184 XY coodinates encoded as a numpy ...
2
votes
1answer
42 views

How do I tag the most interesting parts of a video?

This is a follow-up question from my previous question here. I'm new to ML/DL, and one thing I need to do is to use a machine or deep learning video attention model which as the name suggests, can tag ...
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
32 views

i have trained my model & now trying to predict but unable to do using keras [closed]

i have trained my model & now trying to predict but unable to do please help. trying to predict cat or dog stuck in "prediction" ...
2
votes
1answer
84 views

How can I keep context in my chatbot

I have created a chatbot by Keras based on movie dialog. I used RNN more specifically GRU . My bot can reply well. But the problem is , it can't hold the context . As an example if I say ...
1
vote
1answer
148 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:- ...
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 ...
0
votes
1answer
48 views

Is a trained model in keras is saved with the weights for max accuracy?

Does a model trained in keras (tensorflow backend) saves the weights with max accuracy and minimum losses or does it simply saves the weights from the last epoch? If it is the latter then how do I ...
0
votes
1answer
309 views

Why does keras model get bigger after training? [closed]

I notice that I create a model using tensorflow.keras.Sequential(), save it and the file size is around 5 MiB, but after I call ...
1
vote
0answers
59 views

Can I perform image recognition using a very small dataset?

I have 3 types of classes and I have 2 images of each object (or class). Can I perform image recognition using this very small dataset?
0
votes
0answers
37 views

What to look for when CNN returns same prediction for every input?

I am trying to use a CNN to do a regression prediction on some statistical data. The data is time-series data formatted into a 2-D grid. The network I'm using looks like this: ...
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 ...
1
vote
0answers
30 views

How to implement Multiple Neural network architecture, connected in parallel and series in Keras or Pytorch [closed]

Hello Dear StackExchange members, I want to make a deep network as shown in the image. I want each 'network 1 to look at the specific part of the input and I don't want to divide my input beforehand ...
1
vote
1answer
484 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
0answers
68 views

Why doesnt my lstm model for time series prediction improve after certain level of performance?

I created an lstm model which predicts multioutput sequeances. It takes variable length sequences as input. These sequences are padded with zero to obtain equal length. Note that the time series are ...
1
vote
0answers
26 views

Issues related to RoI Pooling in keras [closed]

I am trying to do RoI pooling of an image whose RoI bounding box coordinates are known to me. Can anyone provide me the code for doing the same? I have read many repositories but I didn't get any ...
0
votes
0answers
29 views

Custom optimizer and word-vector evaluator lstm

I’m using Keras LSTM layers and building a model that is trained off ethics text. I have a problem of often over fitting (the network basically remembers my input corpus as it is very small). I was ...
1
vote
0answers
67 views

Keras CRNN implementation with multiple input images

Hello I am trying to implement a CRNN with multiple input images (in my context it is 6 images) This is a regression problem and output is two real value. And for the CNN block I am thinking of using ...
3
votes
1answer
4k views

Adding BERT embeddings in LSTM embedding layer

I am planning to use BERT embeddings in the LSTM embedding layer instead of the usual Word2vec/Glove Embeddings. What are the possible ways to do that?
1
vote
0answers
31 views

Why such a big difference in number between training error and validation error?

Question Why such a big difference between my 'Train loss' and 'Validation loss' as shown in the picture below? Is it a signal that my codes are wrong and my trained network is wrong as well? Some ...
0
votes
1answer
33 views

Intermittent type error when operating CNN inside Docker container [closed]

I've been working on a simple computer vision API with a few endpoints for grabbing useful information from ebay images. The API lives in a docker container that looks for the h5 files, downloads ...
1
vote
0answers
52 views

How can I interpret the following error graph?

I am training a neural network which produces the following errors (epoch number on the x axis). I have some questions regrading interpreting it. When I say ...
2
votes
0answers
210 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 ...
1
vote
1answer
25 views

What type of network for a repeated experiment

good day I have a problem where i have 9 data points that are collected every minute for 40 minutes, and by the 40th minute the solution would be either end up being black or white. I would like to ...
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 ...
1
vote
0answers
76 views

train loss does not convergence [closed]

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
182 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 ...
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 ...
1
vote
1answer
269 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
231 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
87 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
69 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
193 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
34 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
105 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
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 ...
1
vote
0answers
42 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 ...
2
votes
2answers
1k views

How to implement word2vec using Tensorflow 2.0 keras API? [closed]

Since Keras API as defined as layers, how would it be used to implement the word2vec?
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 ...
0
votes
0answers
234 views
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 '...
2
votes
1answer
319 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 ...
1
vote
2answers
539 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
0answers
144 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
27 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 <...