Questions tagged [keras]

For questions related to Keras, the modular neural networks library written in Python. However, note that programming questions are off-topic here.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
27 views

Possible overfitting?

I'm trying to make a CNN model that is a binary classifier using Keras. But it seems i'm overfitting by analysing the val_loss that i'm getting. Load Data Function: ...
Lemon_prog's user avatar
0 votes
0 answers
37 views

uncertainty estimate for medical image classification by deep learning models [closed]

I am doing project about uncertainty in deep learning and how to implement it so I came to a conclusion that uncertainty is like a parameter or quantity to measure within the model so when training ...
a-eng's user avatar
  • 17
0 votes
0 answers
12 views

Tips for getting LSTM to train for next word predcition

I am trying to train an LSTM network for next work prediction. I have scraped a rather large dataset from Wikipedia of country descriptions. I have done normal preprocessing (removing punctuation and ...
thehumaneraser's user avatar
1 vote
0 answers
31 views

How can an MLP be implemented with convolutional layers?

I am studying the architecture of the network pointnet, specifically the MLPs stages of the pipeline highlighted in red in the following image (taken from the author page here): It is strange to find ...
Jacob Morales Gonzalez's user avatar
1 vote
0 answers
26 views

How can I tell a CNN to ignore nodata values in satellite images?

I'm trying to train an image segmentation model on satellite images. There are two main issues: first, not all of the images are the same size. My understanding is that by using a fully convolutional ...
gnarw0lf's user avatar
0 votes
1 answer
188 views

Keras Subclassing : TypeError: 'KerasTensor' object is not callable Call arguments received by layer [closed]

Implementing UNet but getting an error: type error 'KerasTensor' object is not callable ...
vivian.ai's user avatar
0 votes
1 answer
22 views

Regression Model diverging after adding a new feature with higher variance and magnitude

In a time series regression problem I'm predicting "change" rather than the actual intended value i.e Instead of: ...
Darren Rahnemoon's user avatar
0 votes
0 answers
13 views

How to use UPSNet or Mask-RCNN? How to format image data for panoptic segmentation?

I want to use UPSNet (github repo) (paper) to train a model to perform panoptic segmentation on my own dataset. I would also consider using a model based on Mask-RCNN to simply perform instance ...
Sam K's user avatar
  • 1
0 votes
0 answers
16 views

Hard time trying to fix overfit

I'm trying to make a binary classification model using keras, but it seems to overfit every time. I have tried differents architectures and its seems that a larger model performs better than a smaller ...
Lemon_prog's user avatar
2 votes
1 answer
63 views

Why do training and fixing a reservoir yield very similar results (in an echo state network)?

Disclaimer: I asked this question 2 days ago in Cross Validated, but it has been left unanswered. I am trying to better understand how echo state networks work. To see, how fixing the weights of the ...
User's user avatar
  • 141
0 votes
0 answers
26 views

Best methods to square rectangular images for OR

I've read previous posts that assert using one of these solutions: crop and or resize nn input size independent In my case, I am using some tensorflow models and afaik they report a fixed size like ...
Mah Neh's user avatar
  • 79
1 vote
1 answer
44 views

How to setup a reinforcement learning model that changes the values of $x$ to maximize $y$ in $y = f(x)$?

Assuming a relation such that $y = f(x)$, where $y$ represents a scalar and $x \in 20 \times 1$ vector consisting of zeros and ones, I want to set up a reinforcement learning model that changes the ...
Fly's user avatar
  • 111
2 votes
2 answers
124 views

Why is a simple regression problem so hard for an MLP to learn?

Consider a very simple problem, which is to find the maximum value out of a list of 5 numbers between 0 and 1. This is obviously trivial, but serves as a good example for a real-world problem I'm ...
Daniel's user avatar
  • 191
0 votes
0 answers
64 views

Found input variables with inconsistent numbers of samples

I have an issue. the model gave me an error of Found input variables with inconsistent numbers of samples: But I don't understand why ...
Python's user avatar
  • 1
0 votes
1 answer
39 views

Which type of neural network to use to classify data by which equation most likely generated it?

Problem Summary: Identify which equation a set of data was most likely generated from Problem Description: Let's say I have two different equations that are functions of variables X and Y and ...
Nova's user avatar
  • 133
0 votes
1 answer
80 views

How do I use ResNet for text processing?

I need to implement a deep neural network [residual neural network (ResNet)] that takes some text as an input [length M x N] and then processes it. Now as far as my understanding goes, ResNet is used ...
Python's user avatar
  • 1
2 votes
0 answers
67 views

Why use z_mean to plot the latent space learned by a Variational Autoencoder?

In the Keras website, there is an example code of a Variational Autoencoder. At the end of such a page, there is an example code that plots the latent space learned from MNIST. The code is as follows: ...
AlexSC's user avatar
  • 149
0 votes
0 answers
24 views

Are there techniques (pygad - tpot-optuna)for best Genatic algorithm optimize hyper prameter cnn 1D

Iam new in mashin learning and i try to optimize tenser flow with keras conv1d model to improve classification by improve hyper kernal and filter For training dataset csv =(1325,33,1) with outputs ...
eyo's user avatar
  • 1
0 votes
0 answers
9 views

Referencing features by name instead of index when feeding inputs

Traditionally the inputs of a model is a matrix of N dimensions. This works well with inputs that are position-sensitive (For example in CV the placement of the pixels relative to each other can be ...
Darren Rahnemoon's user avatar
2 votes
1 answer
56 views

Are the "artifacts" in select Keras MNIST training images really there or is my download corrupt?

I'm having fun with a ludicrously well known and used dataset: mnist. I am doing it with a huge and well known tool: keras. Please excuse the red dots, something else I was doing. I have otherwise ...
EngrStudent's user avatar
0 votes
0 answers
28 views

agent based DNN with a loopback

I have a data problem with no direct reward mechanism,(test/train) good and fault solutions. Though over a long time period good decisions might be made. I've been searching for days now for an agent ...
Peter's user avatar
  • 101
1 vote
1 answer
406 views

How embeddings learned from one model can be used in another?

In the website the following explanation is provided about Embedding layer: The Embedding layer is initialized with random weights and will learn an embedding for all of the words in the training ...
Oculu 's user avatar
  • 23
1 vote
0 answers
29 views

Loss Function for Binary Classification with Multiple Correct Choices

I have a binary classification problem, where there are multiple correct predictions, however, I would consider the prediction to be correct if the highest confidence prediction of a 1 is correct. I ...
John Meighan's user avatar
0 votes
0 answers
52 views

cannot get the results for each individual execution in hyperband tuner

I am trying to use keras tuner hyperband to select hyperparameters for my autoencoder model. Here's some pseudo code: ...
YoungResearcher's user avatar
0 votes
1 answer
118 views

What data can I obtain from CNN model (H5 file)? [closed]

I created a CNN model and it is saved in h5 format. I used the Netron app, where I obtained the model architecture, however ...
Rezuana Haque's user avatar
0 votes
1 answer
120 views

Help on Deep Sarsa algorithm that work with pytorch (Adam optimiser) but not with keras/Tensorflow (Adam optimiser)

I have a deep sarsa algorithm wich work great on Pytorch on lunar-lander-v2 and I would use with Keras/Tensorflow. It use mini-batch of size 64 wich are used 128 time to train at each episode. There ...
rdpdo's user avatar
  • 1
1 vote
1 answer
1k views

keras model accuracy not improving

I am trying to do multi class(16) classification, however no matter what parameters or number of layers I use my accuracy is not improving, its in 30s the max I got was 43. I have tried early stopping ...
SACHI SINGH's user avatar
0 votes
0 answers
399 views

how to appy action mask

I'm trying to figure out how action masking works and the closest workaround i get is following the hanabi environment example and then write my own custom version ...
Jonathan Nuñez's user avatar
1 vote
1 answer
83 views

Why does my neural network perform different on the same images during training and testing?

I use tensorflow keras to build a neural network that classifies images of covid-19 rapid tests into three classes (Negative, Positive, Empty). During training the ...
Sohrab Tawana's user avatar
0 votes
1 answer
243 views

How exactly does Keras calculate the validation accuracy?

After each epoch, Keras provides the following evaluations (depending on how the model is compiled): train_accuracy train_loss validation_loss validation_accuracy Keras evaluates the performance of ...
David's user avatar
  • 101
0 votes
1 answer
77 views

Shuffling vs Non-shuffling train/test set yields drastically different results

I am currently working with a very deep NN (200mio. to 350mio. params). My data set is roughly of shape (2mio, 350), i.e. 2mio samples and 350 features. In fact, the features are time series. As input ...
NicFit_88's user avatar
0 votes
0 answers
82 views

Getting predictions from tab transformer model

I am working on implementing the tab transformer model into my dataset, and have it working so far and giving a fair ROC_AUC.I am using the code as seen below for my dataset. The only variation I have ...
user19634316's user avatar
0 votes
0 answers
129 views

Implementing K fold cross validation

Here is my current neural network ...
user19634316's user avatar
0 votes
0 answers
88 views

How to generate multiple captions from an image captioning model in Keras/Tensorflow

I am practicing one of the popular image captioning keras model (LINK IS HERE). Basically this model takes Flickr8k dataset where each image has 5 captions. ...
albert's user avatar
  • 3
0 votes
0 answers
25 views

Keras Multiclass Classification - More units than classes on last layer

I am building a CNN to classify spectograms and using the following architecture currently: ...
Tomás Nunes's user avatar
0 votes
1 answer
316 views

Time taken to solve cartpole environment using DQN

I am trying to solve the cartpole environment (GitHub) using DQN agent. I have been building my own DQN agent by following a tutorial by Jon Krohn. I am able to solve the environment with a maximum ...
Rishidhar Kasam's user avatar
0 votes
0 answers
16 views

How to penalize the dependence to inputs in Tensorflow + Keras?

I have a sample of triplets $(x,y,z)$ with $z = f(x,y) + \epsilon$ where $\epsilon$ is a centered noise. I want to learn $f$ through a neural network in tf.keras. What I know about $f$ is that $f(x,y)$...
Aristodog's user avatar
  • 111
1 vote
0 answers
258 views

Why can't I reproduce my results in keras using random seed? [closed]

I was doing a task using RNN to predict a time series movement. I want to make my results reproducible. So I strictly followed this post: https://stackoverflow.com/questions/32419510/how-to-get-...
user900476's user avatar
0 votes
0 answers
18 views

is there any variation in the results if you resize a image with black lines?

Hello I need to resize a lot of images each of these has its own random size, for example, I have photos with the following size 100x200 102x200 202x201 ... in general, the resolution of each photo of ...
Tlaloc-ES's user avatar
  • 113
2 votes
3 answers
216 views

Is it possible to learn the number of layers?

Is it possible, in a transformer or other deep architecture, to include the number of layers as a parameter of the model so it could be learned? In fact, I have a keras layer that I use to change the ...
arivero's user avatar
  • 51
-1 votes
1 answer
133 views

Denoise autoencoder not training properly [closed]

I'm trying to make a denoise autoencoder wherein the encoder part is vgg16 and decoder is opposite of vgg16(encoder) network. My dataset consists of 5K images in grayscale. Now while training, the ...
arizona_3's user avatar
-1 votes
1 answer
887 views

can't find a viable import class for keras.utils.Sequence [closed]

I am using Google Colab. tensorflow version = 2.8.0, and keras is the same. I am trying to get a BalancedDataGenerator(Sequence) class created, but I can't get <...
Jennifer Crosby's user avatar
0 votes
2 answers
79 views

Overfitting problem - poor performance on test data

I'm facing the problem of overfitting and I can't deal with it - I tried experimenting with optimizer, but nothing seems appropriate. My model has extremely poor performance on testing data and the ...
San's user avatar
  • 1
0 votes
1 answer
474 views

Do the values over 0.5 mean my model classified the data as a "1" label and vice versa?

I am doing binary classification using an LSTM and my output layer is 1 neuron with a sigmoid function. My labels are either 0 or 1. ...
Allen Ye's user avatar
1 vote
1 answer
385 views

Which approach can I use to generate forged signatures from real ones?

I am in internship period and I'm working on a signature verification problem. This process needs real and forged signatures. All I have are the real signatures (like 30 signatures per person), and I ...
Mohamed Yahyaoui's user avatar
0 votes
1 answer
142 views

Where can I find authentic references on "categorical cross entropy" and "categorical accuracy metric"?

My Python source code uses TensorFlow and Keras to implement a neural network. The Keras source code uses something called "categorical cross-entropy" and "categorical accuracy metric&...
user366312's user avatar
-1 votes
1 answer
764 views

Low accuracy and high loss in multi-class classification [closed]

I'm trying to classify images in 17 flowers dataset which consist of 1360 images of 17 classes (80 images per class); I have to use DNNs only therefore I made my model with the following settings: <...
ShirinJZ's user avatar
0 votes
1 answer
421 views

Weights initialization once the Neural Network is trained

I am trying to understand how weights are initialized in a Neural Network using Keras deep learning framework and what happens if I train a Neural Network and then I want to train it again: are the ...
HelpNeederStudent's user avatar
0 votes
1 answer
91 views

Why does validation accuracy stop rising so soon?

I have implemented a GRU to deal with youtube comment data. I am a bit confused about why the validation score seems to even out around 70% and then keeps rising, this doesn't look like overfitting ...
nibs's user avatar
  • 1
1 vote
2 answers
294 views

Are these book example CNN results realistic?

I've been following a deep learning book and the current section I'm on is about convolutional neural networks. The author presents some code to create a basic CNN with about 1 million parameters, ...
rad's user avatar
  • 21

1
2 3 4 5 6