We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [keras]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
6 views

Why when I apply GaussianBlur in my images, my model overfit? CNN KERAS

I have 1400 images (700 each class), and i'm using vgg-16 to classificate between one and other class. But when I apply the preprocess method Gaussian Blur (which seem to be very much clear to see the ...
1
vote
0answers
9 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 ...
0
votes
0answers
11 views

What's the difference between encoder/decoder and autoencoder?

What's the difference between the encoder-decoder model and autoencoder model? Or are they the same thing? Thanks!
0
votes
1answer
9 views

Semantic Segmentation using Keras: loss function and mask

I am about to start a project on semantic segmentation with a grayscale mask. The thing is, we have to detect for each pixel of the image if its an object or the background (binary class problem). I ...
1
vote
2answers
30 views
0
votes
0answers
9 views

Kera CNN TypeError: float() argument must be a string or a number, not 'NoneType' [migrated]

I tried to set up a binary CNN with Keras using ImageDataGenerator and flow(). I have looked at other threads with similar ...
0
votes
0answers
5 views

Hypothesis Test for Classifier, but without the original model

I just trained a number of DenseNet-based CNN models using an optimization technique that I created for my master dissertation. The problem is, my advisor wants me to perform a hypothesis test to ...
0
votes
0answers
17 views

CNN implementation low accuracy on MINST data

I'm trying to implement VGG11 (Model A of Table 1 from https://arxiv.org/pdf/1409.1556.pdf) on the MINST dataset but I'm getting ~10% train & test accuracy (as bad as random guessing). I had to ...
0
votes
0answers
3 views

Multi-GPU: Lower performance with more workers, smaller batch size, smaller queue

I'm getting unexpected results when I'm tweaking the training parameters of my run. CNN model (~1M parameters, consecutive 2D CNN into two FC layers) Data set: 20k images from CelebA with 218x178x3 ...
0
votes
2answers
29 views

How to handle weekdays in a NN?

I want to test if using additional information of weekdays would improve my NN. Therefore, I just converted the weekdays numerically such as ...
0
votes
0answers
33 views

Accuracy of CNN on images taken under different conditions

I have a dataset containing images taken under 4 different conditions. When training the model, I use the same proportion of images (25%) from each condition. Then, I'm testing on 4 different test ...
0
votes
0answers
38 views

Error loading a model (.h5 file) after training yolo-keras classification model

I am working on realtime object detection using my laptop's camera with Yolo and Keras. I have trained a model and the resulting output is a .h5 file containing (from my understanding) the model and ...
1
vote
1answer
30 views

How to calculate accuracy, precision and recall, and F1 score for a keras sequential model?

I want to calculate accuracy, precision and recall, and F1 score for multi-class classification problem. I am using these lines of code mentioned below. ...
0
votes
0answers
22 views

Keras regression Model : No probabilities for the predicted number

I have been experimenting with the Deeplearning Keras regression model, where the model predicts the house prices based on the image. I have used a linear regression model: ...
0
votes
2answers
25 views

How to get an intution for generating Keras CNN layers for a model

I am going through tutorial for handwritten text recognition. And to do hand written digit recognition the author has constructed a Keras model as follows: ...
0
votes
0answers
29 views

UserWarning: `Sequential.model` is deprecated

C:\Users\AppData\Local\Continuum\anaconda3\lib\site-packages\keras\engine\sequential.py:110: UserWarning: Sequential.model is deprecated. ...
0
votes
0answers
7 views

Understanding the output of embeddings and an error message when I change a parameter in the embedding layer in Keras/tensorflow 2.0 [closed]

I am trying to understand and familiarize myself with embeddings. I created an artficial dataset of 5000 observations comprised from the union of 5 datasets: Sample of 1000 values drawn from a ...
0
votes
0answers
16 views

TF/Keras: different results based on how I combine models

I'm trying to follow the Transfer learning with a pretrained ConvNet tutorial, using my own images and data. If I first run my images through the base model (MobileNetV2), and then take the results ...
2
votes
0answers
26 views

Did I do the right thing in my CNN Keras (class imbalance - augmentation)

To implement my Binary CNN in keras, I had a dataset of ~~35000 images but only 700 is from one class and all the others are from the other class, so what I did: I get the 700 unique images from class ...
0
votes
0answers
11 views
0
votes
0answers
20 views

Should I remove the background of my training images?

The images in my dataset look are as below: The images have either a purple background or a white one. But the trained model (cnn) will be tested on images from the field ,that is, they will most ...
2
votes
0answers
54 views

Results are too good.. what is wrong? How to predict correctly?

I am about to evaluate a neural network and want to check whether the predictions make sense. The variables: ...
0
votes
0answers
9 views

How to feed data to multi-output Keras model from a single TFRecords file

I know how to feed data to a multi-output Keras model using numpy arrays for the training data. However, I have all my data in a single TFRecords file comprising several feature columns: an image, ...
0
votes
0answers
11 views

Keras Custom Loss Function

I am looking to design a custom loss function for Keras model. The model itself is neural network that accepts a set of images and is supposed to run a regression to get an output, which is a value. ...
0
votes
0answers
10 views

Transfer learning training accuracy starts from a fixed value

I am training a transfer learning model using tensorflow.keras library for image classification. I am dealing with 7 classes. I have used several pre-trained models ...
0
votes
0answers
6 views

why evaluate_generator accuracy too much by using flow_from_directory with shuffle true?

i am using tensorflow and keras on colab i train with shuffled data but i met this strange accuracy with evaluate_generator with my training set that has 95% acc if i did not shuffle my data with ...
1
vote
1answer
34 views

How do I know how to construct the layers of my CNN

I've done a CNN project with Keras and OpenCV, and I've got roughly 65% accuracy. And now I have to present this work in my University, but I'm afraid if the teachers ask me for how do I knew how to ...
0
votes
0answers
29 views

sess.run in losses.py

now I want to use sess.run in losses.py so that complex codes can be written by python style for customizing error function as below; ...
1
vote
0answers
23 views

Understanding reduced dimension embedding from tabular data

Background I am working on building a collaborative filtering recommender system in Keras for a school project, following an approach from this article. The approach is to take tabular user, item ...
0
votes
0answers
5 views

How to plot the LSTM model

I am using the following simple LSTM model that is implemented using Keras. ...
1
vote
1answer
24 views

How reproducible should CNN models be? [closed]

I want to train several CNN architectures with Google Colab (GPU), Keras and Tensorflow. Since the trained models are not reproducible due to GPU support, I would like to train the models several ...
-1
votes
0answers
18 views

Predicting three next word based on input data using LSTM

I am working on an assignment on next word Prediction. I am trying to create a model which can be used to generate next words based on the input like swift key and gives three options to chose as the ...
0
votes
0answers
16 views

Viewing TensorFlow datasets vs. pandas DataFrames: Differences?

A simple preview of a pandas.DataFrame is typically done by calling head(k) and will simply return the first ...
0
votes
0answers
47 views

For loop and assignment procedure in losses.py for customizing loss function of ML model

I want to customize a loss function for neural networks. A computation of the loss function requires the inclusion of a for loop like below. However, it is super difficult to implement because ...
2
votes
2answers
31 views

how to access weights of individual Neurons in the output layers in MLPs?

im working on a neural network using Keras. Its an mlp(multi-layer perceptron). With 8 Neurons in the output layer. Is there a way I can access weights and biases of individual neurons of the output ...
0
votes
0answers
16 views

Dropout noise shape when applying it on a series

I am training a neural network based on the Deep Sets framework (https://arxiv.org/abs/1703.06114, https://arxiv.org/abs/1810.05165). The basis of this approach is that one has a series of input ...
0
votes
1answer
27 views

metric performances varies with each training run of my deep learning model

My model (a biLSTM model in keras) gives different results for my test metric (precision) each time I train. My metric varies between 80% and 92%. That is really bad. What reason besides a bad ...
0
votes
0answers
12 views

Convolution with different dilation rates for each dimension

How can I get a dilated convolution with different dilation ratio on each axis? Tensorflow/Keras would be best. For example, the filter in the gif below would have the following properties: ...
1
vote
1answer
46 views

How can I increase my accuracy avoiding overfitting? CNN-Keras-VGG16

As I asked in this question: Why are my predictions bad, if my accuracy in train is roughly 100% (Keras CNN) , my problem was Overfitting, so, I reduce the number of layers, and now I have this model: ...
1
vote
1answer
27 views

Issue with output dimensions in keras

I'm currently trying to build and train a model for CIFAR data using keras. My labels should be one-hot encoded. data.y_train.shape is (45000, 10). My model is ...
0
votes
1answer
9 views

What methods are used to determine acceptable loss levels for autoencoders?

I've been looking at autoencoders for disparate uses such as dimension reduction, blurring or sharpening images and data denoising. What methods are used to determine acceptable loss levels for ...
0
votes
1answer
24 views

How to fine tuning VGG16 with my own layers

I want to maintain the first 4 layers of vgg 16 and add the last layer. I have this example: ...
0
votes
0answers
9 views

How to build Keras Model for Data set which contains both Time_Series Data and other Feature Data?

I have a data set which contains Time Series Data and other features data. Usually we using RNN or any Variant of RNN like LSTM for time series data and simple Dense Layer for features Data. I need to ...
0
votes
0answers
22 views

How to improve model confidence for each category in binary classification problem?

I am new to machine learning and expanding upon an introductory tutorial I followed with some artificial housing data I created. I asked this question on stackoverflow and was referenced to the data ...
4
votes
2answers
130 views

Why are my predictions bad, if my accuracy in train is roughly 100% (Keras CNN)

In my CNN i have to handle 2 classes in a binary system, I have 700 images each class to train, and others to validation. This is my train.py: ...
0
votes
0answers
16 views

LSTM pulse signal prediction

i'm trying to capture long-term dependencies using LSTM, by creating a unit pulse signal every 62 points. The idea is to go back 62 time-steps and copy the value for the next time-step, so as to ...
0
votes
0answers
16 views

My LSTM regression predicts always the same value

I tried two different models for a regression model. The first one is a basic dense neural network. The performance is, for now, not great at all, but at least, it predicts always different values. ...
1
vote
0answers
14 views

What is the difference between these 2 training scenarios?

I have a very large dataset and due to computational constraints, I have to divide the data into 20 parts (each part is around 1.5GB). I constructed a deep CNN model using Keras for this dataset. The ...
0
votes
0answers
7 views

How to proceed after tuning hyperparameters?

As I am still on the journey to understand what when and how to use, I am now at the point how to proceed after finding the best hyperparameters: Define Model (NN) Split Data into ...
1
vote
2answers
29 views

Why Keras Dense layer is expanding number of tensors in each layer

I have following model: and I wonder why is the number of parameters different for e.g. dense_2477 and dense_2482? Both layers ...