Skip to main content

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
2 votes
0 answers
39 views
+100

How to Create a Neural Network Model to Generate Dance Movements Based on Music in MMD Format

I am working on a project where I need to create a neural network model to generate dance movements based on music. My goal is to achieve results similar to this video: https://youtu.be/FrA7f5F9TsI ...
meow meow's user avatar
0 votes
0 answers
28 views

No matter how I change a loss function I get it equal to infinity

I am a bioinformatician, and at the moment I am working with a dataset containing ~12.3 million mutations for ~5500 individuals. The goal is to perform binary classification. I use this framework to ...
YKY's user avatar
  • 101
0 votes
0 answers
28 views

Shape mismatch error in a multi-input model with Keras API

My intention is to have a classification model where different types of input could have individual hidden layers before being concatenated downstream. I get the error (below) stating that my input ...
Art's user avatar
  • 1
0 votes
0 answers
14 views

Optuna Hyperband Algorithm Not Following Expected Model Training Scheme

I have observed an issue while using the Hyperband algorithm in Optuna. According to the Hyperband algorithm, when min_resources = 5, max_resources = 20, and reduction_factor = 2, the search should ...
Tnb Marketplace's user avatar
0 votes
0 answers
12 views

weighted multi class classification

i'm working on a multi class classification problem which classifies jellyfish and plastic pollution so basically i have 6 classes (barrel_jellyfish, compass_jellyfish, lions_mane_jellyfish, ...
Gabovix's user avatar
0 votes
1 answer
52 views

model.fit fails using keras sequential (slice index ### of dimension 0 out of bounds) [closed]

this is the most simple model I can think of for my data yet I can't use the fit function, it gives an error. the desired procedure is to make a simple autoencoder : from 576 nodes to 64 then back to ...
Bikay's user avatar
  • 23
0 votes
0 answers
33 views

How can I process financial stock data before passing it to an LSTM for time series classification?

I'm trying to make an LSTM that can classify the next day of a stock as either 1 or 0 for going up or down. The issue I've been having is that Keras tuner seems to stay at a constant value of val_loss ...
JhonDenver's user avatar
0 votes
0 answers
49 views

What best practices for VAE do you know?

The data is binary voxel data of shape (60, 36, 60). I want to compress such data into ...
Renat Abdrakhmanov's user avatar
0 votes
1 answer
407 views

Why does the latent space in Stable Diffusion have a shape of 64x64x3?

Since the encoding is performed by a Variational Autoencoder, the VAE encoder must output some mean and log variance that we can ...
Renat Abdrakhmanov's user avatar
0 votes
0 answers
55 views

VAE ( variational autoencoder) for timeseries anomaly detection ,

I am implementing VAE based anomaly detection for multivariate timeseries using keras, I have ELBO (Evidence lower bound) which is combination of $$-\ D_{KL}\left({\ q}_\varphi\left(z\middle| x^i\...
mmv_87's user avatar
  • 1
0 votes
0 answers
30 views

Deployment of Model into Java Application

Over the past few months, I have developed and tested a TensorFlow U-Net model based on the Keras Functional API. Recently I have been interested in deploying this model for use in a Java application ...
Max's user avatar
  • 13
0 votes
0 answers
32 views

Why does the accuracy get stuck at a constant value when using Keras for multiclass singles-label classification problem?

I am trying to solve a multiclass classification problem using Keras. The current network looks as follows: ...
isostar's user avatar
2 votes
1 answer
63 views

If the output is 0.09, does this mean that the prediction is class 1 or 0?

I use a Keras EfficientNetB7 and transfer learning to solve a binary classification problem. I use tf.keras.layers.Dense(1, activation="sigmoid")(x) for ...
Doug's user avatar
  • 25
0 votes
0 answers
7 views

Design approach for image classification regarding genders

I am new to the world of AI and wanted to ask your guidance on how to design a ML model to classify genders based on images. There will be only one person in the image. The person could be kids, ...
Doug's user avatar
  • 25
0 votes
2 answers
68 views

Keras functional model returning unexpected output dimensions [closed]

So, this is my model: ...
Aliquis's user avatar
0 votes
1 answer
29 views

Keras accuracy does not change for multi-output module

I want to predict the penalty/punishment given for fraud cases, with inputs in the form of (damage amount(\$), if recidivism), and targets in the format of (fine(\$), jail(months), community service(...
Aliquis's user avatar
0 votes
0 answers
20 views

kerascv retinanet for gender identification

I am using KerasCV Retinanet to detect people and their genders in images. I would like to detect "man", "woman", "boy", "girl" and "baby" in images. ...
Doug's user avatar
  • 25
0 votes
0 answers
26 views

I'm trying to build image search like Google Photo-Image with face is given to model & it'll get all the images in database in which he/she is present

When a user upload a selfie, the model search same person in dataset of images of multiple persons and get back all the images in which that person is present. Step 1: From dataset of images I detect ...
BKP's user avatar
  • 1
0 votes
1 answer
95 views

Transfer learning using pretrained tensorflow object detection model [closed]

I am new to AI/ML and wanted to seek guidance as I am totally lost. I will simplify my issue as follows: Let's say I would like to detect apples and oranges in images. I would like to leverage a pre-...
Doug's user avatar
  • 25
0 votes
0 answers
19 views

How is the accuracy as a metric in a Keras machine learning model calculated? Is it a valuable metric for LSTM

I'm training a LSTM neural network for time series prediction in Keras. During the training of the model, the loss (mse) gradually decreases each epoch, but the accuracy as well as the validation ...
Mappy's user avatar
  • 1
0 votes
2 answers
35 views

Must I "prime" my normalizer with the same data I trained it with in order to use it?

I trained a Keras Network. During training, I would first initialize a normalizer from the values in the entire dataset, then partition into train, test and validation datasets. After partitioning, I ...
Pittsburgh DBA's user avatar
0 votes
0 answers
37 views

MultiLayer Perceptron not working for regression problem, what could I try?

I am trying to learn the inverse kinematics of a robotic manipulator. To do that I have a simulator with which I acquired data. My dataset is composed of positions in X, Y and Z and actuator variables ...
Guillaume's user avatar
0 votes
0 answers
45 views

How to setup correctly a sequence generation task with RL/policy gradient learning?

I've a pretrained model for sequence generation that I'd like to improve with RL but there are several shady points. So, I have the following model and loss function: ...
eris's user avatar
  • 1
0 votes
1 answer
48 views

Easiest way to train a neural-network with neurons that deviate from $f_{nl}(x \cdot A)$

I want to model how a neural network would behave for a system of input-output devices that are only approximately similar to a neuron. I think I have a resonable plan for how to do this, but I'm ...
Steven Sagona's user avatar
0 votes
0 answers
42 views

Updating custom output layers of an LSTM network

I have a text generation task learning to predict the next word with an LSTM network with multiple output layers. After the generation of a sentence has finished, I calculate a reward for the whole ...
eris's user avatar
  • 1
1 vote
1 answer
211 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
2 votes
1 answer
116 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
1k 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
25 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
2 votes
1 answer
157 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 avatar
1 vote
1 answer
64 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
153 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
1 answer
52 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
177 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
179 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
2 votes
1 answer
72 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
36 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
3 votes
3 answers
3k 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
  • 43
1 vote
0 answers
37 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
1 answer
225 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
185 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
2k 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
1 vote
1 answer
169 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
1 vote
1 answer
526 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
  • 111
0 votes
1 answer
532 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
1 answer
672 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
1 vote
0 answers
275 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
2 votes
3 answers
230 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
179 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
1k 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

1
2 3 4 5 6