Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [keras]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
21 views

Techniques and semantics in better training of deep learning models

I'm relatively new to Deep Learning, and trying various models and datasets using Keras. I'm starting to love it! Through-out my experimentations, I have come into ...
1
vote
1answer
27 views

Semantic issues with predictions made by my trained model

I'm new to Deep Learning. I used Keras and trained a inception_resnet_v2 model for my binary classification application (fire ...
2
votes
1answer
35 views

ValueError: Error when checking target: expected dense_3 to have shape (1,) but got array with shape (2,)

I am trying to build a CNN model on Keras. The data has a dimension of 921 rows × 10000 columns. Here is the code: ...
1
vote
1answer
12 views

How to represent integer values in sequence to sequence prediction task in encoder-decoder LSTM?

I have a large 2D grid having 30k rows and 35k columns, so a total of 30x35k grid cells. Each grid cell is represented by a unique integer number (identity of grid cell). I have several trajectories ...
2
votes
1answer
42 views

What is the fastest way to train a CNN with billions of examples?

I have a CNN model that I need to train for a large scale genomics application. It is working well with a subset of my training data. I have scaled up to a subset of about 130 million examples and ...
5
votes
1answer
56 views

How do I combine models trained on different data to increase classification accuracy?

I have two trained models. One is using a LinearSVC algorithm and is trained on numerical data from medical examination from patients with diabetic retinopathy. The second one is a neural network ...
2
votes
0answers
42 views

Which deep neural networks are appropriate for the detection of bombs?

This is a follow-up question from my previous post here about explosion detection. I gathered a dataset of explosions. As I'm new to Deep Learning in Keras, I'm trying to see what architecture best ...
2
votes
0answers
52 views

How can I increase the speed and performance of my implementation of an AI for Reversi?

I made an AI for Reversi, aka Othello (8×8), like Alpha Zero, using this book. This book is written in Japanese. The source code of the AI I implemented can be found in this Github repository. There ...
3
votes
2answers
27 views

Using a neural network to identify a stable region within a set of data?

I am working on a problem in which I am attempting to find a stable region in a spiral galaxy. The PI I'm working with asked me to use machine learning as a tool to solve the problem. I have created ...
0
votes
0answers
7 views

How to set loss weight to zero for an output dimension in keras?

Suppose I am training a model to detect facial keypoints that allow occlusions to be present. The input is an image of a face, and the model has to predict the x,y coordinate of both eyes and mouth. ...
1
vote
0answers
16 views

How we can keras.Imagedatagenerator from csv file? [closed]

How we can use Imagedatagenerator to produce images if we have a folder with a name "train" which contain all the images of every classification( folder contains mixed images). And we have one csv ...
1
vote
0answers
19 views

How to implement CNN with variable number of images in tensorflow or keras?

Suppose I have a problem where I want to classify the color of LEDs seen in the image. I can use OpenCV to pinpoint the exact location of these LEDs but I do not know their color for sure because the ...
2
votes
1answer
72 views

Why is this ResNet50 misclassifying objects?

I'm new to Deep Learning, and I have some conceptual problems. I followed a simple tutorial here, and trained a model in Keras to do image classification on 10 classes of logos. I prepared 10 classes ...
2
votes
1answer
18 views

The best way of classifying a dataset including classes with high similarity?

I have a dataset which has two very similar classes (men wrestling, women wrestling). I've used InceptionV3 as a classifier to solve the problem of classifying this dataset. Unfortunately, the ...
0
votes
1answer
25 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
53 views

Which model can I use for this problem with multiple inputs and outputs?

Which model is the most appropriate for this problem with multiple inputs and outputs? The data set is A1, A2, A3, A4, A5, A6, B1, B2, B3, B4 where ...
0
votes
0answers
19 views

Why is the value range of my LSTM model's prediction different from my test labels?

I am using LSTM to do time-series anomaly detection. The data is an hourly sensor input across multiple years (i.e. the global_active_energy attribute of the dataset from https://www.kaggle.com/uciml/...
3
votes
1answer
44 views

Multivariate Regression Model

I want to build a Multivariate Regression Model in Keras (Tensorflow as backend), with multiple values as input and output of the model. It is for a technical project with multiple variables as ...
0
votes
0answers
19 views

How does keras `train_on_batch` return value work?

From the doc, train_on_batch() will return a scalar representing the loss and the metric. I want to know whether the loss/metric is evaluated before the weight is ...
0
votes
1answer
48 views

TF Keras: How to turn this probability-based classifier into single-output-neuron label-based classifier

Here's a simple image classifier implemented in TensorFlow Keras (right click to open in new tab): https://colab.research.google.com/github/tensorflow/docs/blob/master/site/en/tutorials/quickstart/...
3
votes
1answer
36 views

CNN how can i reduce gpu memory usage with large image sizes?

I am trying to train a cnn-lstm model, my sample image sizes are 640x640. I have a GTX 1080 ti 11GB. I am using Keras with tensorflow backend. Here is the model. ...
2
votes
0answers
28 views

how to use Softmax action selection algorithm in atari-like game

I'm currently writing a program using keras (python 3) to play a game similar to Atari games, only in this one there are objects moving in the screen in different angles and directions (in most of ...
1
vote
0answers
24 views

How to get same accuracy with identical models in Keras and Tensorflow?

As we all know Keras backend uses Tensorflow and so it should give out same kind of results when we provide same parameters, hyper-parameters, weights and biases initialisation at each layer, but ...
6
votes
0answers
72 views

Why would you implement the position-wise feed-forward network of the transformer with convolution layers?

The Transformer model introduced in "Attention is all you need" by Vaswani et al. incorporates a so-called position-wise feed-forward network (FFN): In addition to attention sub-layers, each of the ...
0
votes
0answers
14 views

Make an LSTM model for each class separately

I have a dataset of some activities. The dataset contains the status of different sensors and the label of activity. T trained a model in Keras with the following architecture which models the ...
1
vote
1answer
33 views

Tensorflow and Keras model having same parameters, hyperparameters, weight and bias initialization give different accuracy? [closed]

I have made sure that layers,parameters, hyperparameters,kernel_initialization, bias_initialization, seed and dataset are all equal. But still the output for both the models are different. ...
1
vote
1answer
39 views

Training Keras Towards Or Against Analog Value?

For example, if I want to do a cat and mouse AI, the cat would wish to minimize the time taken for it to catch the mouse and the mouse would want to maximize that time. The time is analog and thus I ...
0
votes
0answers
7 views

Looking for the right type of 1D-Convolution that only considers one column/attribute

My input has the shape of n rows (time steps) and m columns (attributes). I want to train a convolutional neural network on it to predict a class. I am currently using 1D-Convolutions. I got a good ...
2
votes
0answers
16 views

L1 Reguarizer in Keras model throwing weight matrix dimension error

Was just experimenting with something when i ran into this error : I am getting matrix dimension errors only when i use L1 Regularizer. I have checked and the regularizer itself doesn't change the ...
0
votes
3answers
93 views

Accuracy too high too fast?

I have a simple text classifier, with the following structure: ...
2
votes
1answer
42 views

Understanding the intuition behind Content Loss (Neural Style Transfer)

I'm trying to understand the intuition behind how the Content Loss is calculated in a Neural Style Transfer. I'm reading from an articles: https://medium.com/mlreview/making-ai-art-with-style-transfer-...
0
votes
1answer
53 views

Why do I get a straight line as an output from a neural network?

I am using feedforward neural network for regression and what I get as a result of prediction is a constant value visible on the graph below: Data I use are typical standardised tabular numbers. The ...
1
vote
1answer
28 views

Is “dataset size” and “model size” same thing?

I mean what is determine my model size, connection amount between layers and neurons, or size of my dataset?
1
vote
1answer
33 views

Create optimizer object using the tf.keras.optimizers.get function

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
86 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
77 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
75 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 ...
0
votes
1answer
54 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
33 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 ...
1
vote
0answers
37 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, ...
1
vote
0answers
20 views

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

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
41 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 ...
0
votes
1answer
44 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:- ...
0
votes
0answers
31 views

Neural Network cannot learn nonlinear function

I am currently creating a neural network to learn a function of the following form I am using both keras and tensorflow and with both scripts I get the following result . Somehow my neural network ...
2
votes
0answers
37 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
19 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
0answers
19 views

Imbalance large dataset with keras using flow from directory

I want to detect dataset bias, and for that, the first approach is to build a model that can recognize from which dataset belongs an image. I am working with Python3, with limited computing and more ...
0
votes
1answer
44 views

Why does keras model get bigger after training?

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
52 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?