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
vote
0answers
14 views

Loss function decays linearly in segmentation MRI fascia

I am working on a segmentation of MRI images of the thigh. I am trying to segment the fascia, there is a slight imbalance between the background and the mask. I have about 1400 images from 30 patients ...
1
vote
1answer
23 views

Why do we need to provide false labels to the discriminator on purpose to train GANs?

This is the tutorial that I used to learn about GANs. In this tutorial, it taught us to intentionally provide false labels to "fool" the discriminator, but does it make the discriminator ...
0
votes
0answers
32 views

Problem having the right input for model.predict() in Keras model [closed]

I have a DQN agent, that receives a state composed of a numerical value indicating its position and a 2D array denoting the requests from a number of users. My attempt of architecting the neural ...
0
votes
0answers
12 views

Python Create Keras Neural Network with Bag Of Words Model for News Classification

I want to train a classification neural network then predict some inputs. It's classic classification example as you know. I'm implementing this with python. I searched a lot about it and I always ...
1
vote
1answer
29 views

DQN layers when state space and action space are multi dimensional

I have built my own RL environment, where a state is composed of two elements: the agent's position and a matrix of 0s and 1s (1 if a user has requested a service from the agent, 0 otherwise); an ...
0
votes
1answer
30 views

Extract Features at Multiple Image-Scales

I try to replicate the results of this paper. They state, that they used VGG16- and VGG19-models pretrained on imagenet and used the output of the last convolutional layer (without relu and max-...
1
vote
0answers
40 views

How to design my Neural Network for Game AI

For my school project, I have to develop an agent to play my game. The base I have is a 'GameManager' which call 2 AIs, each taking a random move to do. To make my AI perform, I decided to make a ...
0
votes
0answers
17 views

Relative Weighting of Loss Weights for Self-Play Reinforcement Learning

I am training some self play reinforcement learning agents to play 2 player board games like Connect 4, Othello, and The Game of the Amazons. For each game, there is a single neural network with 2 ...
0
votes
0answers
9 views

sklearn.exceptions.NotFittedError: This LabelEncoder instance is not fitted yet [migrated]

I'm trying to run a voice recognition code from Github HERE that analyzes voice. There is an example in final_results_gender_test.ipynb that illustrates the steps ...
0
votes
0answers
13 views

How would named recognition and entity linking interface with subsequent machine learning model?

I have a database containing summary of the movie, the price of the movie, location, language. I would like to make a prediction on 'like' based on previous like of a user. I am wonder how the output ...
0
votes
0answers
17 views

How to afine the extremity values in regression prediction with Keras?

I made a stack of bidirectional LSTM layers following by Dense layers (with swish activation functions) in order to predict a continuous value between 0 and 2. I compiled the model with ...
0
votes
0answers
36 views

Distinguishing between handwritten compound fraction and subtraction

I am working in a project named "Handwritten Math Evaluation". So what basically happens in this is that there are 11 classes of (0 - 9) and (+, -) each containing 50 clean handwritten ...
0
votes
0answers
35 views

Unable to meet desired mean squared error

I wish to get MSE < 0.5 on test data (https://easyupload.io/zr7xf3) which is 20% of given data chosen randomly. But I am reaching 0.73 using both plain Ridge Regression as well as a neural network ...
2
votes
2answers
229 views

How to tell a neural network that: “your i-th input is special”

Assume that I have a fully connected network that takes in a vector containing 1025 elements. First 1024 elements are related to ...
2
votes
1answer
34 views

Evaluate model multiple times in loss function? Is this reinforcement learning?

I am interested in models that exhibit behavior. My goal is a model that survives indefinitely on a two dimensional resource landscape. One dimension represents the location (0 to 1) and the second ...
2
votes
2answers
142 views

What is the need for so many filters in a CNN?

Consider the following coding line related to CNNS Conv2D(64, (3,3), strides=(2, 2), padding='same') It is a convolution layer with filter size $3 \times 3$ and ...
0
votes
0answers
25 views

Pytorch and keras ddqn seem identical, only keras learns

I followed a tutorial for ddqn to beat pong, it beats it with a perfect score in keras, but trying to translate it to pytorch it doesn't learn at all. What am I missing? I pasted all the code for each ...
0
votes
0answers
26 views

How to make a CNN/RNN on a non-binary dataset?

I am using TensorFlow + Keras to make a CNN/RNN. I'm quite new to AI, I've only made a few relatively basic networks for image regression/classification. The end goal of my project is to determine the ...
0
votes
1answer
23 views

Image Classification for watermarks with poor results

Just starting learning things about tensorflow and NN. As an exercise I decided to create a dataset of images, watermarked and not, in order to binary classify these. First of all, the dataset ( you ...
1
vote
0answers
19 views

Duplicating calculations in CNN-LSTM architecture

I want to use frames from video game and analyze them using CNN and LSTM. But when I have the model defined like that ...
0
votes
1answer
29 views

How to construct input dependent convolutional filter?

I am constructing a convolutional variational autoencoder for images, starting out with mnist digits. Typically I would specify convolutional layers in the following way: ...
0
votes
0answers
9 views

What is the difference between TimeDistributed CNN+RNN and passing sequence of features to RNN

I found Keras API that allows to add additional time dimension. ...
2
votes
1answer
26 views

Generation of 'new log probabilities' in continuous action space PPO

I have a conceptual question for you all that hopefully I can convey clearly. I am building an RL agent in Keras using continuous PPO to control a laser attached to a pan/tilt turret for target ...
0
votes
1answer
40 views

Why does the output shape of a Dense layer contain a batch size?

I understand that the batch size is the number of examples you pass into the neural network (NN). If the batch size is 10, it means you feed the NN 10 examples at once. Assuming I have an NN with a ...
0
votes
0answers
13 views

Why is the variance of my model predictions much smaller than the training data?

I trained a GRU model on some data and then created a bunch of predictions on a test set. The predictions are really bad, as indicated by a near zero R2 score. I notice that the variance of the model ...
1
vote
1answer
31 views

Why is the convolution layer called Conv2D?

When I build a convolution layer for image processing, the filter parameters should have 3 dimensions, (filter_length, filter_width, color_depth) is that correct? ...
1
vote
0answers
32 views

Using DDPG for control in multi-dimensional continuous action space?

I am relatively new to reinforcement learning, and I am trying to implement a reinforcement learning algorithm that can do continuous control in a custom environment. The state of the environment is ...
0
votes
2answers
50 views

Is there a neural network that accepts both the current input and previous output?

I am quite new to neural networks. I am trying to implement in Python a neural network having only one hidden layer with $N$ neurons and $1$ output layer. The point is that I am analyzing time series ...
1
vote
0answers
22 views

Keras model accuracy not improving beyond threshold

I am currently working on a public project for the National Weather Model. We are experimenting with using a recurrent neural network to replace the output of a quadratic formula that is in use. The ...
1
vote
0answers
55 views

What is the best way to make a deep reinforcement learning environment with a continuous 2D action space?

I understand that the actor-critic method is probably where I want to start because of how it works with continuous action spaces. However, the problem I am trying to solve would require the action be ...
0
votes
0answers
47 views

ConvNet - What to improve regarding architecture, procedure and technique?

I have a dataset of 180k images of license plates (so, not necessary to localize the license plate at first) for which I try to recognize the characters on the images (License plate recognition). All ...
1
vote
0answers
50 views

Embedding Layer into Convolution Layer

I'm looking to encode PDF documents for deep learning such that an image representation of the PDF refers to word embeddings instead of graphic data So I've indexed a relatively small vocabulary (88 ...
1
vote
1answer
46 views

When would bias regularisation and activation regularisation be necessary?

For Keras on TensorFlow, a layer class constructor comes with these: kernel_regularizer=... bias_regularizer=... ...
0
votes
0answers
37 views

Micro average f1_score, None average f1_score cannot increase more than 0.71, 0.50 respectively for the best model estimator

I am training a multilabel text neural network and the model metric I chose, to measure the performance of the training and the validation sets, is the f1 score (Micro average, None average). However, ...
0
votes
0answers
39 views

CIFAR-10 can't get above 10% Accuracy with MobileNet, VGG16 and ResNet on Keras

I'm trying to train the most popular Models (mobileNet, VGG16, ResNet...) with the CIFAR10-dataset but the accuracy can't get above 9,9%. I want to do that with the completely model (include_top=True) ...
1
vote
1answer
45 views

Do correlations matter when building neural networks?

I am new to working with neural networks. However, I have built some linear regression models in the past. My question is, is it worth looking for features with a correlation to my target variable as ...
2
votes
1answer
85 views

Understand the DDPG algorithm in Keras

I'm trying to understand the DDPG algorithm using Keras I found the site and started analyzing the code, I can't understand 2 things. The algorithm used to write the code presented on the page In the ...
1
vote
1answer
81 views

Binary mode or Multi-label mode is correct when using binary crossentropy and sigmoid output function on multi-label classification

I would like to ask a question about the relationship of accuracy with the loss function. My experiment is a multiclass text classification problem, and I have built a Keras neural network to tackle ...
2
votes
0answers
42 views

Inaccurate masks with Mask-RCNN: Stairs effect and sudden stops

I've been using matterport's Mask R-CNN to train on a custom dataset. However, there seem to be some parameters that i failed to correctly define because on practically all of the images, the bottom ...
0
votes
0answers
23 views

Time distributed word position prediction

I am facing the following problem. I need to create a model to predict the product groups from product title. For each word in sentence I need to predict position of a word marked as product. My ...
0
votes
0answers
22 views

Different result from k-cross validation model and Train-Validation-Test split model ? (AI fresher question)

I am starting to learn about Neural Network and I have come into one problem that I am still learning how to figure it out. I have a dataset with shape (105,96) (105 samples and 95 first column as ...
0
votes
1answer
40 views

Number of LSTM layers needed to learn a certain number of sequences

Theoretically, number of units for a LSTM layer is the number of hidden states or the max length of sequences as per my practice. For example, in Keras: ...
0
votes
0answers
52 views

Why is my DDPG agent (implemented in TensorFlow) not learning?

I am trying to implement a Reinforcement Learning algorithm called DDPG in TensorFlow 2.x on a custom gym environment. I am new to TF. So, I started with the DDPG TF 1.x implementation from pemami4911....
0
votes
0answers
24 views

CNN keras accuracy not improving

I am trying to duplicate and learn from example given on this website . With my little modification, I am trying to simple exchange color for example like red to orange in an image. The original ...
0
votes
0answers
25 views

Binary classification to recognize blobs on pictures generates many false-positive results

I am training a NN for blobs vs non-blobs recognition. Blobs example: Non-blobs: Keras architecture is: ...
0
votes
0answers
34 views

Which loss function and evaluation metric should I use for a multiple output prediction problem?

I was running into a situation with a data set like this I have 4 events and and they might happen together in pairs. I want to use 3 features to predict the coupling between event. I am building a ...
0
votes
0answers
29 views

How much data do we need for making a successful de-noising auto-encoder?

Is there a guide how much data do you need for making successful denoising model using autoencoders? Or the rule is, the more data, the better it is? I tried with small dataset 350 samples, to see ...
2
votes
2answers
79 views

How can I have the same input and output shape in an auto-encoder?

I'm building a denoising autoencoder. I want to have the same input and output shape image. This is my architecture: ...
1
vote
1answer
145 views

How do you manage negative rewards in policy gradients?

This old question has no definitive answer yet, that's why I am asking it here again. I also asked this same question here. If I'm doing policy gradient in Keras, using a loss of the form: ...
0
votes
0answers
41 views

How does multiple outputs added from intermediate layers of a keras functional model influence its learning behaviour / gradients?

let us assume I have a keras functional model with 2 inputs. My model has two branchs, each branch for each input. The model only uses dense layers. The first input is the data itself (feature vector ...

1
2 3 4 5