Questions tagged [keras]

Open source high-level neural network library for Python and R. Is capable of using TensorFlow or Theano as backend.

Filter by
Sorted by
Tagged with
2
votes
0answers
20 views

Why is the loss stuck in high plateau?

I'm struggling with my model (below), since despite some hyperparameters tuning i always end with a sudden rise of the loss function and then a 'infinite" plateau. My hypothesis were: -learning ...
1
vote
1answer
40 views

l1-regularization of network weights not going to zero

I'm working on an autoencoder that transforms a very high dimensional space (~10,000 inputs) through two hidden layers of 256 nodes each. (I settled on these values given the reconstruction error but ...
0
votes
0answers
11 views

Why is Dense network outperforming LSTM on regression?

I'm working on PV system power output forecast, this is my dataset: 3 years of data with 15 min temporal resolution. I then cut this into x_train, y_train, x_test ...
0
votes
2answers
100 views

Sigmoid vs Softmax Accuracy Difference

I have trained a neural network on DNA sequences data and my training set has exactly the same number of data in both classes. When I select a softmax function at the end, my accuracy remains at 47% ...
0
votes
0answers
20 views

Why does tf.keras.experimental.preprocessing.Normalization sum over all samples, and why can't this be changed? (Time-series)

From my understanding, when dealing with time-series data, it makes sense to sum normalize the features channel-wise in the time-domain. This means that we treat each channel separately and sum over ...
0
votes
0answers
24 views

Interpretation of Loss and validation Loss in Keras

I am building a model to predict one label by taking one feature as an input. The two variables seems to be strongly correlated. I wanted to build a (sequential) Neural Network model with Keras in ...
0
votes
1answer
16 views

Does keras include a was to turn a classifier's prediction into a classification? [closed]

I have a model where the output is a one-hot encoding of 6 classes, meaning y_train is of the shape (1000,6) model.fit(X_train, y_train, epochs=1, batch_size=10) ...
1
vote
0answers
35 views

LSTM Time Series Forecasting

I am working with Bitcoin block data and attempting to forecast target hashrate ~one month in advance. I have condensed the raw block-by-block data into daily data and calculating metrics like ...
0
votes
0answers
8 views

How does Keras Evaluate handle Multilabel Sigmoid Problems

As I am working on tuning a model multilabel densely connected model, I am realizing that I don't understand how the model is being evaluated. My current model has 20 potential labels and ends with a ...
0
votes
0answers
8 views

word embedding using Keras Embedding layer

I am learning using Keras Embedding layer to build embedding models. However, I failed to build a good embedding model. Can anyone help me check where I did wrong? Or not enough data to train? Data ...
1
vote
1answer
44 views

Undo Batch Normalization in NN

I am using 2 BatchNormalization layers in Keras for a huge dataset that does not fit into memory. I can train with normalized values, but since I want to do a ...
1
vote
0answers
17 views

Simple LassoRegression Outperforming Tensorflow?

I am trying to predict the bookings of a stand-up comedian cafe. There are a lot of features I can use which have an affect on the number of sales. (e.g. day of the year, weather, average sales last ...
0
votes
0answers
15 views

CNN - Is L2 counted at every layer?

I build one CNN model with this code: ...
1
vote
1answer
19 views

Why shouldn't you mix variable size inputs in the same minibatch?

I am trying to build a CNN-LSTM architecure in tf.keras that classifies sequences of varying sizes. My training data is highly variable and I would have to crop/pad sequences in order to create ...
0
votes
0answers
6 views

why is the accuracy of my RNN model going up and down so much

So I am using RNNs and using the train and test datasets. I have pre processed all the data and used one hot encoding, normalization, feature selection etc but the accuracy of the model is looking a ...
0
votes
0answers
23 views

Autoencoder failed to find anomaaly

We're using the following architecture for anomaly-finding- ...
1
vote
0answers
13 views

How to do online training in keras?

How to use a stateful RNN in online training in keras. So at each time step I get one element of one sequence. I have sequence1: e11 ->e12 - >e13 Sequence 2: e21 ->e22 ->e22 Seq 3....... ...
1
vote
0answers
15 views

Bilinear Interpolation Algorithm for up-sampling 2D images

In keras it is possible to use UpSampling2D layer to up-sample an image. You can use Bilinear Interpolation. Given an image ${h\times w}$ it is possible to increase its size in ${h*k\times w*l}$, ...
0
votes
0answers
26 views

Sliding window of LSTM

My input data has every 4 consecutive rows assigned for a different class. I want to use an LSTM for class prediction and for that I need to pass slice of 4 in the LSTM at once, I tried using the <...
1
vote
0answers
16 views

Can't get any learning on a simple regression problem with Keras

I know this problem would be better suited to a simpler technique, but it's a an exercise rather than a real problem. I have generated linspace values for training data and a function across them for ...
0
votes
0answers
3 views

Calculating micro F-1 score in keras

I have a dataset with 15 imbalanced classes and trying to do multilabel classification with keras. I am trying to use micro F-1 score as a metric. My model: ...
0
votes
0answers
10 views

What is the difference between a BERT model using the ktrain Wrapper vs a BERT model using the hugging face transformer

I came across two ways of building the BERT model and was wondering if there are any significant differences in the way they work or of they are the same. Thank you
0
votes
1answer
38 views

Does GridSearchCV actually fit the best model to the training data, or do you have to refit after hyperparameter optimisation?

I have this code, with the aim being to develop a neural network with cross validation and hyperparameter optimisation for a regression problem (continuous features, continuous label). ...
1
vote
0answers
11 views

MobileNetV2 in Keras: Adjusting depth

I am trying to reconstruct specific U-Net architecture with the MobileNetV2 backbone using Keras. It seems for MobilenetV1, there is a way to adjust the depth using the ...
1
vote
0answers
16 views

keras input data ratio setting

a newbie question not sure if it's a correct method since I've got an imbalanced dataset (binary class, class1 12000 class0 2000, class separated in different folder) I found that my model sometime ...
3
votes
0answers
33 views

KFold CV and Monte-Carlo CV performance for a regression problem

I've ran the following code on google colaboratory. Succintly, I've used some housing prices for a typical regression problem, and then trained the same simple neural network, but with different Cross-...
1
vote
0answers
18 views

One-hot encoding in Keras for R [closed]

I am trying to build a binary classifier using a MLP with the Keras package in R. My question is, why does the package require the labels to be a one-hot vector? For example, the value 1 will be the ...
1
vote
0answers
19 views

1D CNN for multistep multiclass timeseries classification

Suppose you have a timeseries classification task with n_classes possible classes, and you want to output the probability of each class for every timestep (like ...
0
votes
0answers
12 views

ANN Train and Test set accuracy becomes 1.0 after second Epoch Keras Classifier

I have the following classification model built: ...
0
votes
0answers
33 views

imbalanced dataset with lots of csv operation (tensorflow,keras)

A project with about 14000 csv files (about 12000 class 0 and 2000 for class 1 for each csv contain 365 columns and 3330 rows (value are either 0 or 1 ) 1.is there any sample code for this kind of ...
0
votes
0answers
18 views

where to find pretrained model for emotion recognition in videos

I am a newbie in machine learning and looking to classify facial emotions from video frames in python. And looking for some pretrained models that could help predict emotions. I am not sure how to do ...
2
votes
0answers
10 views

How to use one external predicted variable in a LSTM model for multi step time series

I am trying to predict energy consumption hour-by-hour with two past years of data for training and one year for testing. The training dataset contains the amount of energy consumed in a given hour ...
1
vote
0answers
7 views

I am curious on “ how to 'grey out' certain output units in neural network depending on different observations?”

Typical code examples I have found does something like this : Feature Engineering e.g. One Hot Encoding, Label Encoding etc in pandas data frame. Splitting into X and y [as numpy array] Defining ...
0
votes
0answers
21 views

Implementing Multiclass Dice Loss Function

I am doing multi class segmentation using UNet. My output from the model is, ...
1
vote
1answer
13 views

What is the best way to eliminate neutral words in a text classifier?

I'm creating a news classifier using the reuters dataset. Right now I'm in the process of preparing the dataset for training. First I removed all punctuation, numbers and special characters and after ...
1
vote
0answers
21 views

Fill in the blank in sentences with bidirectional LSTM in Keras

I'm currently studying RNN, in particular LSTM and I was trying to figure out how to implement a bidirectional LSTM to fill in the missing word in a sentence. I have a doubt about the strucuture of ...
0
votes
0answers
9 views

What activation should I use for an age estimation cnn?

New to CNNs and I am writing my first Keras CNN for age estimation and gender prediction. I am struggling to decide what activation I should use for the age output of my CNN. ...
0
votes
0answers
11 views

Inferior accuracy of Bayes by backpropogation verses backpropogation

I want to build a simple regression NN over 300 dimensional input (x_train = n x 300, n= number of training samples). For the same, my NN works quite satisfactorily (as compared against kernel ridge ...
0
votes
0answers
23 views

How to do augmentation and k-fold cross validation?

I am solving one NLP problem which by default gave me train and test data. Test data has no labels while train has. Now I split train dataset into train(I will call this as updated train dataset) data ...
1
vote
1answer
52 views

Tensorflow loss and accuracy during training weird values

I am doing some testing with tensorflow, and I bumbed into a very weird behaviour. Here is my code ...
0
votes
2answers
33 views

Proper shape of LSTM dataset for keras

I understand that similar questions have been asked before, but they are all based on specific examples. I want to consider a very simple example: we have a sequence of 1000 numbers, and want an LSTM ...
0
votes
0answers
16 views
0
votes
0answers
34 views

Enable Regression Neural Network ReLU to predict zeroes

I am building regression neural network with keras. My target variable has values between 0 (inclusive) and up to 10. It is highly skewed towards low numbers, so ...
0
votes
0answers
22 views

Tensorflow unit scale preprocessing layer

I would like to have a keras model self-contained to reduce the training/serving skew. It would mean here having a preprocessing layer that is doing essentially what MinMaxScaler from scikit learn is ...
0
votes
0answers
4 views

Marking the location of classes on an image with keypoints given a dataset of images, classes and keypoints

I have a dataset of 1000 images and 1000 JSON files. For example, the JSON file for the first image looks like this: index class aspect keypoints 0 roof new [(22, 24), (23, 2323)] 1 awning old [(76,...
2
votes
1answer
18 views

It is always necessary to include a Flatten layer after a set of 2D convolutional layers for convolutional neural networks in Keras?

It is no clear for me when to use the flatten operation for building convnets. It is always necessary to include a flatten operation after a set of 2D convolutions (and pooling)? For example, let us ...
1
vote
1answer
40 views

Is it possible to generate an 1D dimensional output of a 2D convolutional layer in Keras?

I'm trying to apply convolutional neural networks for dealing with a 2D input, which is a 2X300 matrix. It is basically a matrix with 2 lines, where each line is a vector of 300 positions. I would ...
1
vote
2answers
33 views

Why models often benefit from reducing the learning rate during training

In Keras official documentation for ReduceLROnPlateau class they mention that Models often benefit from reducing the learning rate Why is that so? It's counter-intuitive for me at least, since from ...
13
votes
3answers
1k views

How would I bias my binary classifier to prefer false positive errors over false negatives?

I've put together a binary classifier using Keras' Sequential model. Of its errors, it predicts with false negatives more frequently than false positives. This tool is for medical application, where I'...
0
votes
1answer
18 views

How to interpret testing loss? When exactly can we say a model is overfitting?

So, I used the Keras sequential model in Python. I understand that, well training and testing accuracy are self explanatory, validation accuracy is a measure on how well it predicts for new data, And ...

1
2 3 4 5
12