Questions tagged [keras]

Keras is a minimalist, highly modular neural network library written in Python.

0
votes
0answers
14 views

Getting validation loss and training loss constants across epochs

I have the following model, where validation loss and training loss is constant. I am processing twitter posts for sentiment analysis. ...
0
votes
1answer
16 views

No gradients provided for any variable

I have composed a customized loss function (kl_loss): ...
2
votes
0answers
33 views
0
votes
0answers
9 views

Is it possible to run sequential forward selection on a neural network?

I'm testing various models (Logistic regression, Random Forest, KNN, SVC, Neural Network) for a binary classification problem. So far I used both Sequential Forward Selection and Sequential ...
0
votes
2answers
17 views

Keras Conv1D model Input_shape value error

I am not sure why I am receiving this value error. Additionally, I haven't found a tutorial that explicitly talks about the appropriateness of size of filters and kernel. I would appreciate some input ...
1
vote
1answer
22 views

Multiclass Regression for density prediction

This is my first question in the DS-community, so I'm happily willing to accept any kind of (meta-) advice :). I have time-series data for a set of users (~100), ...
2
votes
4answers
45 views

How to get high accuracy in CNNs?

ML and Data Science world. I am a newbie to CNNs, but do possess a basic understanding of ML and Neural Networks. I wanted to create my own CNN that works on the Cats and Dogs Dataset. I ...
0
votes
0answers
13 views

keras custom metric function how to feed 2 model outputs to a single metric evaluation function

I have an CNN object detection model which has two heads(outputs) with tensor names 'classification' and 'regression'. I want ...
0
votes
1answer
17 views

Predict using a saved regression model

I have trained an ANN model for a regression problem which takes 10 parameters as input and gives 1 output. After training, I saved the model as json and weights as a .h5 file using keras. Now I want ...
0
votes
1answer
12 views

How is the “loss” calculated which is supplied by the callback log in Keras?

I.e. categorical cross entropy? binary cross entropy? Something else? Or is it perhaps the loss function which you pass into the model.compile method?
0
votes
1answer
9 views

Reason for Training and test loss sudden increment after some epochs keras

We know that if training and test loss are different from each other, our model is over-fitting. However, if both get high after some epochs, how can we justify it? One way to solve it is to reduce ...
0
votes
0answers
17 views

loss function for model that predicts a matrix

I'm trying to develop a neural network model that takes a chess board as input and predicts an 8x8 matrix of squares that the white player can reach. Each input is an 8x8x10 matrix, where each 1x1x10 ...
0
votes
0answers
21 views

Transfer learning on yolo using keras

I am working on a project that uses object detection. I have logo images that need to be detected in a video. I am doing this in keras. I followed this blog to convert the yolo weights to a keras ...
1
vote
1answer
30 views

Strange binary classification result with a model that indicate it has been well-trained

The problem : I am trying to build a model for binary classification for melanoma 'MEL' and nevus 'NV' the dataset is from ISIC archive ISIC 2019 but for 8 different type of skin lesion, I am using ...
0
votes
0answers
8 views

Keras input for multivariate classification with LSTM using current features and previous timesteps features and y values

I am working on a multivariate binary classification problem. What I want to do is to predict a binary classification given the features at the current timestep and the data (features+real ...
4
votes
3answers
43 views

How can I know if my conv1D model is overfitted or underfitted from loss curve?

I am working on classification of time series multivariate data. By doing PCA, I converted multivariate to uni-variate and fed it into a conv1d in keras. However, I am getting a very high accuracy ...
0
votes
0answers
12 views

What change should I make in the Image Data Generator to solve the error? [closed]

I am trying to perform Mixup Augmentation (details here) but I am getting a value error as follows : ...
1
vote
1answer
37 views

Using LeakyRelu as activation function in CNN and best alpha for it

Since if we do not declare the activation function, the default will be set as linear for Conv2D layer. Is it true to write: <...
0
votes
0answers
9 views

Keras model not resuming training well

I tried resuming training with my keras model, to save the model I used model.save('model.h5'). And to load it again I used ...
0
votes
4answers
33 views

Keras model giving error when fields of unseen test data and train data are not same

I have created a simple Keras deep learning model in python. Total no of variables in training are 195 while in unseen test data are 181.All input fields are categorical(converted by one hot encoding)....
0
votes
2answers
23 views

I have a word2vec embedding - now what?

I've always relied on the Keras embedding layer for my NLP work. But for my latest project I want to use a custom embedding layer. I have gone through the steps to create a word2vec file but now what? ...
1
vote
1answer
33 views

What does an Input layer of shape=(None,) or (None,12) actually mean?

Is this telling the model that there are two dimensions (i.e. it’s a matrix) but we don’t yet know the size of that particular dimension? If so, how can the model be compiled? Doesn’t the size of each ...
1
vote
1answer
20 views

install_tensorflow() keeps overwriting virtualenv, making it impossible to install tensorflow and keras

I would like to use the Keras & Tensorflow package for R in RStudio. Everytime I use the command install_keras() or install_tensorflow(), I get the following error: ...
0
votes
0answers
9 views

Converting our model to other formats

I am using NVIDIA platform for running some medical imaging workflows. I came to know that NVIDIA accepts model only in the below formats a) graph def b) saved model c) trt plans d) caffe netdefs ...
0
votes
1answer
14 views

How to get weightage of each factor for a prediction in a neural network classifier?

I am working on a model to predict which employee is going to resign from a firm. The dataset has columns like Date of Birth, Date of Joining, Department, Gender, Marital Status, Years at company etc. ...
1
vote
0answers
15 views

Can't save save/export and load a keras model that uses eager execution

I'm following the RNN text-generation tutorial with eager execution pretty much line for line. I've trained the model with my own data set and have saved a low loss checkpoint. I'm able to load the ...
2
votes
2answers
45 views

Are mini batches sampled randomly in Keras' Sequential.fit method()

When you .fit a Keras Sequential() model, you can specify a batch_size parameter. I have ...
1
vote
3answers
71 views
0
votes
0answers
20 views

Feature engineering keywords for keras network

I am building a multi-label classifier, using the keras sequential API. My goal is to take an input of keywords 'cat', 'dog', 'rabbit' and apply a custom label. My ...
1
vote
2answers
40 views

What arguments should I pass to input_shape parameter of LSTM function in Keras?

My dataset has 2944424 rows and 6 columns. I am using an LSTM in Keras to forecast taxi demand. I am having problem with the input_shape parameter of the LSTM. It ...
0
votes
1answer
14 views

Improve the loss reduction in a neural network model

The following code is to train a neural network model of a given dataset (50,000 samples, 64 dim). ...
1
vote
1answer
22 views

Can word embedding be used for text classification on a mix of English and non-English text?

I'm doing text classification on text messages generated by consumers and just realized even though most of the replies provided by consumers are in English, some are in French. I've used Keras word ...
1
vote
0answers
11 views

Face Landmark Detection Solution

Lately I have been working on image classification problems but just recently I tried a new type of Problem on Kaggle. I have normalized image data(X) by dividing with 255 and also the keypoints ...
0
votes
1answer
30 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
21 views

Extremely slow CNN

I am trying to train a CNN with keras in R. I have a time series that is 3-dimensional, so every sample has dimensions 95 x 365 and has 80 features, which I feed in as channels. The output is only 1 ...
1
vote
1answer
30 views

High train and val results. Bad test and predict results

For my thesis project I've been trying to make a CNN for some challenging data. There's four classes with the following amount of images respectively [410, 410, 269, 206] = 1,295 total. Now I know ...
0
votes
1answer
19 views

how to use multiple generator in keras fit_generator()

I want to train the multi-input model on a set of images. I use ImageDataGenerator.flow_from_directory() and fit_generator in ...
0
votes
0answers
19 views

Help with Tensorflow 2.0 beta not learning

Have a tabular data set and have done some graphical exploration with Orange 3. Attempted NN regression with Keras/TensorFlow 2.0 beta on Python 3.6.7. The problem is that TF 2.0 is not "learning" (...
0
votes
0answers
16 views

NotImplementedError: `fit_generator` is not yet enabled for unbuilt Model subclasses

I'm trying to build a model to classify images. The model runs perfectly fine locally. When I run using Google Cloud AI platform, I get the error: ...
0
votes
0answers
21 views

Keras InvalidArgumentError With Model.Fit()

I am trying to call model.fit() on a sequential Keras model, but get this error: ...
0
votes
1answer
25 views

Deep Learning with Keras. Classification problem with large data

I have looked on the internet and found a lot of discussion about image classification problems, but almost none of just classification problems without images. I am trying to build a model with Keras ...
0
votes
1answer
7 views

Intermittent type error when running CNN inside Docker container

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

Multi strep time series forecasting using daily data & LSTM

I have daily data from Jul 2017-Dec 2018 which makes 549 data points. I was trying to forecast Jan 2019 using Oct 2018-Dec 2018. In this example that is demonstrated above I can understand that in ...
0
votes
1answer
26 views

My network optimises for mean_squared_error, but the predictions are useless

After going through the tutorials of tensorflow I decided to do my own project. For this I did the following: I have scraped movie reviews from a polish site called filmweb. I got a dataset o 5400 ...
0
votes
0answers
16 views

Error: Negative dimension size caused by subtracting 3 from 1

The dataset here is the famous MNIST. Here's the error: Negative dimension size caused by subtracting 3 from 1 for 'conv2d_8/convolution' (op: 'Conv2D') with input shapes: [?,1,1,64], [3,3,64,128] ...
2
votes
1answer
22 views

In the Keras Tokenizer class, what exactly does word_index signify?

I'm trying to really understand Tokenizing and Vectorizing text in machine learning, and am looking really hard into the Keras Tokenizer class. I get the mechanics of how it's used, but I'd like to ...
0
votes
1answer
20 views

Regarding Training loss and validation loss

I am trying to use keras for multi label news classification. I am a beginner in machine learning so please bear with me. Here is my training loss vs validation loss diagram: I understand that ...
0
votes
1answer
26 views

Why am a getting wrong prediction when combining two list of samples, which individually gives correct prediction?

So I am coding in Python. I have to set of samples. Set1 contains samples of class A and the other set, Set2 contains samples of class B. These samples taken are a part of the training dataset. When I ...
0
votes
1answer
30 views

How to determine input shape in keras?

I am having difficulty finding where my error is while building deep learning models, but I typically have issues when setting the input layer input shape. This is my model: ...