Questions tagged [keras]

Keras is a popular, open-source deep learning API for Python built on top of TensorFlow and is useful for fast implementation. Topics include efficient low-level tensor operations, computation of arbitrary gradients, scalable computations, export of graphs, etc.

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

Should rescaling be used on test images in keras?

I am kind of confused regarding the topic. I have built a CNN architecture for the cat-dog image classification around 6000 images of cat and 6000 images of dog and I am predicting on test images. I ...
-1
votes
0answers
7 views

model stuck in first epoch

Every other model is running in seconds on M1 Macbook but this is model is taking infinite time to run the epochs.I am not able to identify the problem here.The same code is working fine in google ...
1
vote
0answers
15 views

How to load a dataset with a specific structure in tfds library?

I have a dataset that it's classes arranged in the following way: /dataset/train/images/class1/ /dataset/train/images/class2/ . . . /dataset/train/images/classN/ ...
0
votes
0answers
13 views

MNIST trained network tested with my own samples

I trained a Dense Neural Network with MNIST dataset in order to classify 28x28 images of numbers. Now I was trying to make it work with my own samples (I draw the image of a "7" in paint and ...
0
votes
0answers
14 views

How does state information get transferred when predicting with LSTM

I have a typical mutivariate time series forecasting problem that I want to solve using an LSTM, with mutliple features in the input sequnce and one feature in the output sequence. If I train my LSTM ...
0
votes
0answers
10 views

Convert a simple NN model to LSTM model (made using Tensorflow.compat.v1)

I have a simple neural net which I would like to convert to an LSTM model. Can someone please help me with the code? The following code contains the neural net part: ...
0
votes
0answers
9 views

Architecture for ConvLSTM

I have an input data with 2000 samples each having shape of (5, 3, 178, 178) where 5 is time dimension, 3 is a color channel, and the rest are x and y-axis. Now I want to use ConvLSTM layer to predict ...
0
votes
0answers
7 views

what does it mean when my accuracy converges asymptotically?

I am training a CNN using keras. My accuracy hits 70% quickly enough, then starts converging asymptotically to about 80%. What is this a symptom of? With a normal stack-o-Dense layers, I have ...
0
votes
0answers
12 views

Is an output layer with 2 units and softmax better than one with 1 unit and sigmoid for binary classification using LSTM?

I am using an LSTM for binary classification and initially tried a model with 1 unit in the output(Dense) layer with sigmoid as the activation function. However, it didn't perform well and I saw a few ...
0
votes
1answer
17 views

Keras ImageDataGenerator unable to find images

I'm trying to add image data to a Kaggle notebook so I can run a convolutional neural network but I'm having trouble doing this via ImageDataGenerator. This is the ...
0
votes
0answers
4 views

Error in py_call_impl(callable, dots\$args, dots\$keywords) - case similar to Leprechault but [migrated]

I am facing an issue that I am not able to solve for hours... and I think I need some help. I am starting from an example Keras in R example that is working fine in my environment Then I am using ...
1
vote
1answer
27 views

How to predict a certain time span into the future with recurrent neural networks in Keras

I have the following code for time series predictions with RNNs and I would like to know whether for the testing I predict one day in advance: ...
0
votes
1answer
19 views

How do I feed my keras model in batches?

I am trying to feed a Sequential model in batches. To be reproducible my example, suppose my data is: X=np.random.rand(24,432) Y=np.random.rand(24,432) My goal is ...
0
votes
0answers
12 views

BayesianOptimization tuning the same parameter with different results

I'm running a hyperparameter search using Keras wherein there is only one hyperparameter explicitly specified (# of LSTM units). However when running BayesianOptimization, after a while I notice it ...
0
votes
0answers
15 views

How to decide number of hidden layers and number of neurons for Autoencoder for dimensionality reduction function?

I have been looking into deep learning and what caught my attention is the implementation of Autoencoder as a dimensionality reduction function for anomaly detection. I found out about it through the ...
1
vote
0answers
15 views

The case of (1,478) dim and parameters of neural network to find out

colleagues, actually I am kind'a new to NN, but hard trying.. I have data: Index: 40073 entries (excluded from training, UID) Columns: 484 entries dtypes: bool(468), float64(2), int64(13), object(1) I ...
0
votes
0answers
5 views

Preprocessing for Transfer Learning Model with an Inception Network

I am trying to build an image classification model using an Inception Network as the base. This is a simple binary classification model. My images are available in many smaller directories within one ...
0
votes
1answer
36 views

How to identify/recognize that a sentence about talks about future?

Brief Introduction: I have a report/paragraph in which there are sentences with reference to future plans/outlooks/expectations for a particular entity. I want to extract all such sentences for now. ...
0
votes
0answers
6 views

What exactly "subset" is in "tf.keras.preprocessing.text_dataset_from_directory"?

so I'm following the official keras tutorial here. However I couldn't really understand the subset and validation_split ...
0
votes
0answers
8 views

Assess feature importance in Keras for one-hot-encoded categorical features

An important aspect of tuning a model is assessing feature importance. In Keras, how to assess the importance of a categorical feature which is one-hot encoded? E.g. if a categorical feature is ...
0
votes
2answers
45 views

Which machine learning model is best for a combination of numerical and categorical data?

I want to develop a ML model which will allow my company to highlight employees which are at a risk of leaving the business, based on a variety of parameters such as performance, absence rates, ...
0
votes
0answers
20 views

Improving validation losses and accuracy for 3D CNN

I have used a 3D CNN architecture, for detecting the presence of a particular promoter (MGMT), by using FLAIR brain scans. (64 slices per patient). The output is supposed to be binary (0/1). I have ...
1
vote
0answers
11 views

Q: Training a CNN-LSTM on video inputs

Hello everyone! I implemented the following model, for action classification from videos, where each frame is 224x224x3, a video consists of ...
-1
votes
1answer
68 views
0
votes
1answer
30 views

problem with using f1 score with a multi class and imbalanced dataset - (lstm , keras)

I'm trying to use f1 score because my dataset is imbalanced. I already tried this code but the problem is that val_f1_score is always equal to 1. I don't know if I did it correctly or not. my X_train ...
0
votes
0answers
11 views

Which comes first: Pruning or Quantization?

I am trying to optimize a ResNet of 4 Residual blocks. The purpose here is to speed up the inference and have a smaller footprint in the memory. After a little bit of research, I found these tutorials ...
0
votes
0answers
22 views

Where is this Pytorch NN version of a Keras example wrong?

I want to write a network inverting the Radon transform. I found an example in Keras here. The network is given by: ...
0
votes
2answers
49 views

High accuracy in mode.fit but low precision and recall. Overfit? Unbalanced? Error?

Hello ive been training a CNN with keras. A binnary clasificator where it says if a depth image has a manhole or not. Ive labeled manually the datasets with 0 (no manhole) and 1(it has a manhole). I ...
0
votes
1answer
22 views

What is glorot uniform?

While reading Bengio and Glorot, came across this, but after going through paper, intution about the algorithm was not so deep, care to explain why was this needed and where they needed to implement ...
0
votes
1answer
15 views

predict a binary vector of size 40

I have a dataset of shape (2600, 95) with first 55 columns are features and 40 columns are label. Label is a binary matrix of size 10x4 that flattened, and features are real valued numbers ranging (0....
0
votes
0answers
7 views

Graph convolution with global information

Is it possible to add global information in addition to node information using Spektral or Pythorch? For instance, information of nodes such as relative position and atomic mass give a molecular ...
0
votes
1answer
25 views

LSTM layer (keras) is causing all layers after it to constantly predict the same thing no matter the input

I have a model for OCR, which after 2-3 epochs gives the same output. When I predicted the values and looked at the output for each layer I realized that all layers after the 1st layer in the LSTM ...
0
votes
0answers
9 views

Why does my Yolov1 output tensor contains negative value?

I have been working on my own imlplementation of the Yolov1 model. The first thing I want to mention is that It seems to be learning. Here is the train/val curves : (<0.1 train and 0.26 val loss) ...
0
votes
0answers
7 views

Is it possible to to only use only a training data sample for creating a LIME model explainer?

I have been looking into outputting a model explainer artefact at time of training my Keras+Tensorflow Neural network. Lime seems like a great choice however my data is very big and I am reading from ...
0
votes
0answers
12 views

Making a row-wise convolutional layer in keras

I would like to make a layer that is almost exactly the same as a Conv2D layer, but essentially has a kernel for each row of the image, so that each row of the output is generated by taking the dot ...
2
votes
1answer
30 views

Keras: Custom output layer for multiple multi-class classifications

Hello, I’m quite new to machine learning and I want to build my first custom layer in Keras, using Python. I want to use a dataset of 103 dimensions to do classification task. The last fully connected ...
1
vote
0answers
17 views

overfitting in captioning model

Train 8000 images Val 1000 images i got this plot for 10 epochs with the last one which is ...
1
vote
0answers
18 views

Why are the results from the keras validation split different from sklearn metrics?

I am training a Keras model, and running: model.fit(X, y, epochs=10, validation_data=(X_test, y_val)) I'm using AUC, precision, and recall as the metrics (also ...
0
votes
1answer
140 views

Could not identify NUMA node of platform GPU ID 0 on M1 MacBook

I am unable to identify this Warning Below. I am using M1 MacBook Air CODE ...
0
votes
0answers
9 views

Random data channel selector layer

I would like to create a custom layer in Keras. The layer will take two arrays as input and will output one of the two arrays, selected at random. No other operations on the arrays are performed. The ...
1
vote
1answer
16 views

Creating and training a Multilayer perceptron model with few data

Are there any ways to create a deep multilayer perceptron model that is capable of making accurate regression predictions based on the training done using around 1000 unique data? I'm currently ...
0
votes
0answers
9 views

How to apply one-to-many LSTM using Keras?

I am finding it difficult to wrap my head around the one-to-many approach using Keras LSTM block. I have 7 input parameters, using which I need to predict a sequence of length 650. I referred to LSTM ...
1
vote
0answers
21 views

Question regarding multivariate LSTM model

I am currently working on a multivariate LSTM model to forecast stock prices and am getting confused about how this model works. For univariate, it is straight forward. I have a dataset with only one ...
1
vote
0answers
24 views

How does data shuffling work when LSTM is involved?

TIL that when using the LSTM layer, the states are remembered throughout the same batch. When using stateful LSTM, they can be even remembered outside of the batch. The first realization gave me a ...
2
votes
0answers
33 views

Multi-Core CPU training on Keras

I want to train models on a machine with multi-cores, I know training on GPU is better but I only have access now on CPU. Which parameters should I set using keras.models.Model.fit to utilize all ...
2
votes
2answers
137 views

Convolutional Neural Network for Signal Modulation Classification

I recently posted another question and this question is the evolution of that one. By the way I will resume all the problem below, like if the previous question didn't ever exist. Problem description ...
1
vote
0answers
14 views

Making use of several time series in one LSTM model

I am working on a case where I want to do a multivariate and multi-step time series forecasting. I have hourly data that measures temperature at approximately 500 different devices. (the devices have ...
1
vote
0answers
10 views

Deep autoencoder: validation loss doesn't change

I'm trying to understand autoencoders and reproduced some code from Keras documentation: ...
0
votes
0answers
16 views

ValueError: Input 0 of layer dense_123 is incompatible with the layer: expected axis -1 of input shape to have value 20 but received input with shape

I was trying to use keras to build a fully connected neural network to predict the winner of men 100m race. For simplicity sake, my data $X$ consists of 6 races (so number of training data = 6), each ...
0
votes
0answers
22 views

Improving accuracy of 2D CNN with time series classification

After somewhat extensive optimization of hyperparameters, my test accuracy remains at around 70 %. I have tried techniques to augment time series but they only make things worse. Unlike image ...

1
2 3 4 5
51