Questions tagged [keras]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
4 views

ResNet50 Model is not learning with transfer learning in keras

I am trying to perform transfer learning on ResNet50 model pretrained on Imagenet weights for PASCAL VOC 2012 dataset. As it is a multi label dataset, I am using ...
0
votes
0answers
10 views

evaluate pretrained model on a new class and previously learned classes

I am trying to write a model to demonstrate catastrophic forgetting. I am using cifar10 image dataset that has got images from 10 different classes. Firstly, I trained the model on 8 classes (except <...
0
votes
1answer
16 views

Keras - Autoencoder different from Encoder + Decoder

I build a CNN 1d Autoencoder in Keras, following the advice in this SO question, where Encoder and Decoder are separated. My goal is to re-use the decoder, once the Autoencoder has been trained. The ...
-2
votes
0answers
17 views

Poor Keras performance with mean squared error loss on MNIST data set [on hold]

I am implementing a simple neural network to train on the MNIST data set. ...
0
votes
0answers
9 views

Scheduled Sampling in Keras

Im wondering how scheduled sampling (maybe together with curriculum learning) as described in this paper [https://arxiv.org/abs/1506.03099] could be implemented in keras. Lets assume a simple ...
1
vote
1answer
22 views

Difference between Gensim word2vec and keras Embedding layer

I used the gensim word2vec package and Keras Embedding layer for various different projects. Then I realize they seem to do the ...
0
votes
0answers
8 views

Connection between Embedding and LSTM and Dense layer

I am building a "predict next word" model using the following model architecture. The codes fine, but I have a few questions: ...
0
votes
1answer
27 views

Prevent overfitting when decreasing model complexity is not possible

I'm fairly new to machine learning and as an exercise for a more complicated task, I'm trying to do the following what I thought was a trivial task. Suppose as an input I have population density maps. ...
0
votes
0answers
8 views

MobileNet and MobileNetV2: Bad Inference Results

unfortunately I am having subjectively bad results in inference with pre-trained models of both MobileNet v1 and v2: ...
0
votes
1answer
17 views

Where can i find an intensive course on TensorFlow and Keras? [closed]

for the past few months, I've been trying to learn TF and Keras for my own personal projects. and while I have found a few courses on Coursera for by deeplearning.ai and many other tutorials on ...
0
votes
0answers
10 views

Keras ValueError: Error when checking model target

The algorithm is designed to describe products (clothes). This part recognizes the colors of clothes (14 output values). First i want to build some simple output model (EfficientNetB5) part of the ...
0
votes
0answers
6 views

Can't visualize Word Embeddings properly

I have used Keras v2.3.1 with TensorFlow 2.0.0 to train a model and save trained word-embeddings for visualization in tensorboard. I am using the following piece of code. ...
0
votes
1answer
20 views

clarification on train, test and val and how to use/implement it

So far I think I understood the differences between the training, test and validation set. Basically it is like in this image: Training set: The data where the model is trained on Validation set: ...
0
votes
1answer
14 views

How to arrange the sets to predict y on x in time series?

I'm performing my first NN with my own data and while I was already tuning the parameters I stumbled over an aspect which confuses me now such that I'm not sure what is right and what is wrong.. ...
1
vote
1answer
15 views

Split time series by python or by keras?

In Python you can use TimeSeriessplit() to split a time series properly for training but you can also do the same(?) in Keras by TimeseriesGenerator. Which one is recommendable? And/or what are ...
1
vote
1answer
45 views

Risk score from Neural Network classifier (more than 2 categories)

I am trying to use a Neural Network to perform multiclass classification. The classes represent Insurance Risk Level. The most risky level is Level 1, the least risk corresponds to Level 10. The ...
0
votes
0answers
28 views

Gan in Keras - You must feed a value for placeholder tensor

i have a problem with the training of my GAN. I get the following error message: ...
1
vote
1answer
21 views

How does keras (TF) know how to differentiate my custom loss?

Suppose I have this custom loss: ...
0
votes
0answers
10 views

SGD Optimizer NAN Loss

I am working on a regression type problem. When if run to train the model i am facing the following outputs. Is there any problem in my code? I also used adam, it gives numeric loss and ...
0
votes
0answers
9 views

GradCAM heatmap all negative

I've fully trained the VGG16 model on my dataset, resulting in a 97% validation accuracy. I'm using the code from this github: https://github.com/PowerOfCreation/keras-grad-cam but for 2 of my 16 ...
0
votes
0answers
8 views

How to run my ML training on azure? [closed]

Ok... so... I am doing an assignment with image classification and my computer is taking FAR too long. I have applied for access to the high power computer at my university but they're still 'getting ...
0
votes
1answer
23 views

What do graphs of signal vs background neural network outputs represent?

For example, this image shows the output of a neural network I assume but I am not sure how the output is not symmetric. So if the neural network gives a .6 for signal it should give a .4 for ...
-1
votes
2answers
40 views

LSTM to predict Sin(x) from x

Hi I want to pass a series of values x1, x2... as input to the model to predict y1 = sin(x1), y2 = sin(x2)... -I created dataset: x=[0.1,0.2,...] and y=[sin(0.1),sin(0.2),...] -I normalize x in [0,1]...
0
votes
0answers
8 views

Number of parameters in a 3D U-Net

I am interested in the 3D U-Net as proposed in Çiçek et al. 2016 (https://arxiv.org/abs/1606.06650). A Caffe implementation is publicly available (in particular, the prototxt), but I am using ...
2
votes
1answer
27 views

Different X, Y input shapes

I'm creating a CNN model in keras to categorise data. There's 150 features (represented as columns), each of which has a label of 1 to 9. The issue is I'm confused about how to use this in Keras since ...
2
votes
1answer
68 views

Running out of memory when training Keras LSTM model for binary classification on image sequences

I'm trying to come up with a Keras model based on LSTM layers that would do binary classification on image sequences. The input data has the following shape: ...
0
votes
0answers
11 views

Training object detection models from the scratch without using pre-trained models and weights

I have a data set of 25 images. I wish to run Faster RCNN or yolov3 object detection models on this images.I want to create my custom trained model and get weights after running say 10 epochs. Later I ...
1
vote
0answers
25 views

How do I use Cohen's Kappa as a metric in a keras model for continuous output?

I am using keras to train a CNN on a dataset. The output should be a value from 0 to 4 and my training y values are integers in that range. I want to create a custom metric that rounds and clips my ...
1
vote
1answer
12 views

How to construct validation set for time series for NN?

I would like to train my model with a validation set. As the data is a time series I have to use timeseriessplit: ...
0
votes
1answer
27 views

What is seed in Keras?

I have seen 'seed' parameter in many codes of Keras. I have a code example here: ...
0
votes
1answer
19 views

The loss and accuracy of this LSTM both drop to nearly 0 at the same epoch

I'm trying to train an LSTM to predict the the Nth token using the N-1 tokens preceding it For each One-Hot encoded token, I ...
0
votes
1answer
32 views

CNN always predicts either 0 or 1 for binary classification

I am using a Kaggle dataset on stress characteristics, derived from ECG signals, and I would like to train a CNN to recognize stress/non-stress situations. I have built a model in Keras: ...
3
votes
1answer
30 views

Predicting the speed of a car

I'm working on the commaai speedchallenge. The goal of the challenge is to predict the speed of a car based on a dashcam video. So far all the examples that I found (example 1, example 2) use some ...
0
votes
0answers
13 views

Spatial and temporal information processing together (CNN and LSTM)

I have small problem that requires to process both spatial and temporal information. I need to predict vehicle's trajectory based on previous trajectory information and map information. My current ...
1
vote
1answer
73 views

How to increase the accuracy of my predictions (CNN fine tuning VGG16 KERAS)

In my VGG16 fine-tuning, I have to classify retinal images in 2 classes (or 4th stage or not 4th stage) and I have 700 images each class to train. This is my code now: ...
1
vote
1answer
20 views

What is the meaning of the parameter “metrics” in the method model.compile in Keras?

I don't have very clear the meaning of the parameter metrics of the compile method of the class model in Keras: ...
2
votes
1answer
47 views

Autoencoders for the compression of time series

I am trying to use autoencoder (simple, convolutional, LSTM) to compress time series. Here are the models I tried. Simple autoencoder: ...
0
votes
1answer
18 views

How can I build a seq2seq model , which is topic aware

I have developed a chatbot, which is basically a seq2seq LSTM network. Which can generate text based on input text. But the problem I am having right now is it is not topic aware. As an example : ...
2
votes
0answers
6 views

Feeding uint8 type to NN

I’m facing some (RAM) memory issues to train a neural network. I have an input array consisting of grayscale images encoded as the type numpy.uint8 (therefore the whole range 0-255 can be covered). ...
0
votes
0answers
11 views

How can we use resnet in autoencoders?

I am creating an unsupervised classifier model, for which i want to use resnet 50 on a custom database and used the top layers of resnet as start point of my autoencoder. How to proceed with this. ...
0
votes
1answer
50 views

X_train, y_train from ImageDataGenerator (Keras)

Can I have X_train, y_train, X_test, y_test from data_generator? Here is my code: ...
0
votes
0answers
21 views

Multilabel image classification failure with a specific dataset

I'm having an issue with a specific dataset. My training for multilabel image classification is returning [class1 and or class2 and or class 3] (only 3 classes for every image) when there are 13 ...
0
votes
0answers
15 views

Vector de-factorization

Suppose one has a data set with a column/vector which consists of factor-like character strings: ["a level", "b value", "c bound", "a level", ...] For conversion ...
0
votes
1answer
13 views

Multi-Output Regression with Keras

I am trying to do a multi output regression using tensorflow. I have got a dataset in Excel which includes a column of input points and 2 columns of output. I coverted all numbers to numpy objects. ...
0
votes
1answer
16 views

Training CNN for Regression

Background: I am using CNN to predict forces acting on a circular particle in a granular medium. Based on the magnitude of the forces, particle exhibits different patterns on its surface. The images ...
0
votes
1answer
39 views

Weird val_loss plot

Why does my validation_loss plot have many fluctuation? Also, its loss range is from 0.4 to 1.2? And also, why does it start from low to high? Isn't that weird? ...
0
votes
0answers
21 views

Issues with Implementation of CNN based on Paper

I am attempting to duplicate a CNN in a paper, and am having issues with bad accuracy and loss not decreasing past 40. As described in this paper, specifically on pages 6/7, the network architecture ...
1
vote
1answer
31 views

Neural Networks: Predicting probabilities of the possible values of y, instead of just predicting y

I have a true value y that I'd like to predict with a regression, but I'm interested in the probabilities that y will be different values. Y is theoretically continuous but in the dataset it is ...
0
votes
0answers
12 views

How to measure performance of a denoising autoencoder?

Is there a way to theoretically estimate (avoiding brute force) what is the minimum signal-to-noise ratio required for a denoising autoencoder (like a regular filter)? What I want to know specifically ...
0
votes
3answers
42 views

Problem with overfitting

I make small CNN from scratch to classify barcodes. I have two classes: one for images with barcodes and second for all what isn't barcodes (items, animals, landscape, furniture, people). I got good ...