Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [keras]

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

0
votes
1answer
13 views

How to load pre-processed .txt data and use it for training convolutional networks?

I have a lot of '.txt' (pre-processed) files related to C3D and I need to use this to train and test while using CNN model. How does one go about this? Most of data in each .txt files are formatted ...
1
vote
0answers
14 views

One hot encoding as input to recurrent neural networks

I'm trying to predict next label in a pattern based on previous labels using recurrent neural network. In total I have 100 labels Example of input pattern: ...
0
votes
0answers
9 views

Accuracy doesn't increase in Binary Classification with 3D coordinates as data

I have 4000 catalogues of galaxies, in each there are 34700 objects, for each of it I have x,y,z coordinates. I want to do a binary classification creating a model which should be able to determine ...
1
vote
0answers
11 views

Keras Binary Classification val_acc won't go past ~67; Full data and code included

I'm working on a binary classification in Keras with a Tensorflow backend. No matter how much I tweak, I can't seem to get my model past a val_acc of 67%. Is there something I'm missing, or is this ...
0
votes
0answers
8 views

openai gym, bound actions to range for continuous action spaces

I have a DDPG implementation that is workable for MountainCarContinuous-v0 where the continuous action range is -1. to 1.. I am using a tanh activation in the final layer of the Actor network as seen ...
0
votes
0answers
10 views

How can NN be thought of as p(x|z) in VAEs?

So, you can feed random input (z) to a NN and make the output random, but that will be just f(p(z)), where f(.) is the deterministic NN. The other way is to think of the NN output as parameteres of a ...
0
votes
1answer
10 views

Training accuracy decreases

I have a program in which I use sequence to sequence approach as a prediction model with attention. The problem is, while training, the accuracy is always decreasing at each epoch, like shown in the ...
0
votes
0answers
19 views

Using regression or classification for rare events

I'm willing to make a model to predict the number of occurences of rare events. I was wondering if classification could work better than regression for that particular case ? The events are very ...
1
vote
0answers
21 views

Keras deviance custom loss

I am trying to use deviance in order to optimize my network. Note that my $y_{true}$ values are equal to 0 more than in 90% of cases (can also be 1 or 2). The deviance is calculated as : $2 \times (...
0
votes
0answers
21 views

How to build this simple generative model?

I'm watching a lecture and it shows (schematically) a model with 2D input (sampled from Gaussian) followed by 12 conv layers, and output an RGB image. That's all about it, no training at all! he ...
0
votes
1answer
17 views

K-means clustering for one class classification

I want to know if I can use the k-means clustering algorithm for a one class classification (as in the case of one class SVM), which means I have data for 2 classes, and I labelled only the one class ...
1
vote
1answer
17 views

Why my CNN model is not learning?

I want to train a model to predict one's emotion from the physical signals. I have a physical signal and using it as input feature; ecg(Electrocardiography) In my dataset, there are 312 total ...
0
votes
0answers
7 views

Train Keras LSTM for sequential data, where the target values for every element are given, except for the last one?

I am currently working on a data set with sequences of trips from certain people. These trips take place from one cluster to another. The starting-cluster of a trip does not always equal to the ...
1
vote
1answer
16 views

How to explain get_weight with autoencoder in keras?

I built an autoencoder model of three layers with 9 5 9. Input dim =9, encoder dim =5, output dim=9 When I get the model weights, ...
1
vote
0answers
8 views

Transfer Learning with CNN layer trainable True - Accuracy not improving

I am working on a image classification problem with 4 classes. And I am using Transfer Learning (Resnet50) to train the model. Below are the observation. Pre-trained weights are from ...
0
votes
0answers
50 views

operands could not be broadcast together with shapes (1,12) (3,) [on hold]

I have the following code, and I get operands could not be broadcast together with shapes (1,12) (3,) error. Why? ...
0
votes
0answers
7 views

Not getting good predictions with Conv1D for vector classification [on hold]

I have a total of 54404 samples, each is a (8,1) vector. The number of classes is 8 and I want to run a keras CNN to classify them. I split the data after shuffling as follows: ...
-1
votes
0answers
17 views

USE GPU with Macbook pro on NVIDIA GeForce GT 650M

I am trying to train my model with Keras in Tenserflow backend with my GPU. I tried everything, installed Cuda and also followed some instructions on the web, however couldnot get it work. ...
1
vote
1answer
16 views

With a MLP (regression), is it appropriate to initialize bias in the final layer to be a value near the expected mean?

For instance, when predicting IQ in a population you would expect the mean to be 100. If you initialize the bias in the final layer you are basically giving the network a head start, telling it in ...
1
vote
0answers
25 views

Keras load pre-trained weights. Shape mismatch

I have some trouble loading pre-trained weights with Keras. Let's say I have a keras model model and that my weights are stored at ...
0
votes
0answers
6 views

How do I improve long-term memory and backwards context sensitivity of LSTM model?

I have some data, which has a lot of theory behind, explaining how it should look. Therefore it's extremely hard to sort this data by conventional methods as it ends up being a long list of if-then ...
1
vote
0answers
19 views

Predict a 100 dimensional array

I have several sentences that I transformed into vectors. With these vectors I would like to predict another vector (which represents a vector of a sentence (the answer)). Can you tell me if this ...
2
votes
0answers
18 views

Embedding variable length “multi-hot-encoded” features

How can I implement an embedding layer in Keras that takes in an input that could have a variable length? For instance, if the vocabulary was 10-long I could have inputs like: ...
2
votes
0answers
25 views

Trained vs randomly initialised cnn model. Difference in inference speed

We have 2 models written in Keras. We then convert them to coreml format and test the inference speed of each one on iPhone 7. The model architecture is the same for each of the two. The 1st model is ...
3
votes
1answer
53 views
+50

Why does my model only converge when I add a MaxPooling with stride of 1 layer at the beginning?

I have a model that takes an input of inertial sensor data collected at 60 hertz and outputs one of two classes. I have broken the data into 1 min snapshots which seems to be appropriate. I have split ...
0
votes
0answers
10 views

How to use document and sentence embeddings in Keras?

Although there is an easy way to use Embedding layer in keras and make use of pretrained word embeddings, is there a way to use document or sentence embeddings?
0
votes
0answers
12 views

Which implementation of word2vec in keras is correct

Recently I was looking into some word2vec implementation using skip-gram model in keras. I come accross two different kinds of word2vec implementation, in which their main difference lies on the way ...
0
votes
0answers
12 views

How to train CNN for steering prediction without central camera?

I have a dataset with 32000 stereo pairs. For each pair I have steering angle label. For my robot I need CNN, which can predict steering wheel angle. But how to train it without central camera? I ...
0
votes
0answers
7 views

Using Keras.utils.Sequence on out of memory dataset

I'm trying to implement a sub-class of keras.util.sequence so that i can load data faster into the function fit_generator. Currently I have a multi-variate time series (multiple features) file which ...
0
votes
0answers
11 views

Optimal architecture of neural networks for classification of samples with both text features and other features

Question: What is (from your experience) the most optimal architecture for a neural network for binary classification when the feature space is a mix of text and contextual features? Background: The ...
1
vote
1answer
41 views

Is this a data issue, or a model issue? A Keras binary classification model

I've been trying to create a binary classification model that predicts wether there will be a train delay based on the train and time. Here is a link to the data The issue I'm having is that my ...
1
vote
0answers
28 views

Something is disastrously wrong with my neural network and what it's produced

I just got a neural network to run and although it doesn't raise any exceptions, I'm left with a horrible mess after 80 to 100 epochs: After 100 epochs with the adapted code: After 100 epochs with ...
0
votes
1answer
24 views

YOLO Pre-trained weights using Open Images Dataset V4

I want to use an object detection model for some use case. I started with the YOLOv3, because I need to be able to perform detection on multiple images in less than few seconds (Even if it is not for ...
2
votes
2answers
25 views

Algorithm for sequences classification

I want to ask wich algorithm can I use to do a sequences classification , knowing that I have two classes (positive /negative), but training is done using data from one class only (positive). Thank ...
1
vote
1answer
17 views

Using a loop to predict longer vectors with a LSTM

I have a model based on LSTMs that can predict a vector output based on a vector input. I can't increase the size of the output because : I would need a larger network to obtain good results It would ...
-2
votes
0answers
25 views

I am getting 100% accuracy in 1st epoch how could it is possible? is this problem with data loading or over fitting? [closed]

(env) hareesh@hareesh-Z270M-D3H:/media/hareesh/hareesh/code_version$ python gen_v7.py Using TensorFlow backend. 101 ...
4
votes
4answers
497 views

What are the possible ways to detect skin while classifying diseases?

I am working on a skin disease classification problem where I have successfully created a classifier ( TensorFlow + Keras ) which can classify images of two skin diseases. The sample image needs to ...
0
votes
1answer
35 views

Please explain CNN architecture

I have this below architecture I would like to understand below question This is my code and my image size is 50X50 ...
2
votes
1answer
20 views

Does a Keras checkpointer save the best weights when using chekpoints with restore_best_weights?

I m training a sequence model in Keras using the tensorflow backend. I've also included some callbacks to save checkpoints and revert to best weights if the model starts to overfit (which it will). ...
0
votes
0answers
3 views

Training LSTM network on raw audio data?

I am trying to give an LSTM network raw audio data in forms of samples (44100 / second). Samples are defined in the [-1,1] value space. Currently I am giving it one sample for the Y values and the ...
0
votes
2answers
51 views

loss/val_loss decrease but acc/val_acc are persistence

I don't know why do I get such fantastic result? Epoch 3/10 2937/2937 [==============================] - 12s 4ms/step - loss: 0.2836 - acc: 0.4679 - val_loss: 0.1937 - val_acc: 0.1980 Epoch ...
0
votes
0answers
10 views

Why is the training accuracy not increasing while implementing MemN2N?

I am trying to implement the MemN2N from here. I tried implementing the code using the Functional API of Keras. I tried changing the optimizer but, I got the same results. Below is my implementation:...
0
votes
1answer
51 views

Maximize Precision Deep Learning

For some binary image classification problems having close to 100% precision is super important and recall is much less important. What are best practices for maximizing precision? Setting the ...
0
votes
0answers
18 views

OS Error: cannot identify the image file <io.BytesIO object at )x00000021C80038150>

I am getting an error. I have tried all the previous solution on internet but it's not working. I guess the problem is with image = Image.open(myvar) but not ...
0
votes
1answer
33 views

Neural Net Accuracy: Test Set vs Real World Data

Neural Net accuracy is high on test set but low on new real world image examples. Looking for advice regarding what generally causes this scenario and how to fix it. Sampling basis? Training/test ...
1
vote
0answers
18 views

GAN optimizer settings in Keras

I am working on a Generative Adversarial Network, implementing in Keras. I have my generator model, G, and discriminator D, both are being created by two functions, and then the GAN model is created ...
0
votes
1answer
14 views

Same classification given for neural network regardless of the input

I am using the MNIST classification tutorials on the TensorFlow website to create my own classification program to predict a footballers value using the FIFA 19 dataset. However, when I run my program,...
1
vote
2answers
58 views

loss/val_loss are decreasing but accuracies are the same in LSTM!

I am trying to train a LSTM model, but the problem is that, the loss and val_loss are ...
0
votes
0answers
14 views

Problems with class embedding in keras

I am doing a toy example with mushroom dataset to learn class embedding with keras: I am trying to embed a single feature: ...