Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [mlp]

MLP stands for multi-layer perceptron, the most basic kind of neural network. Also called DNN (deep neural network), as opposed to CNN or RNN (convolutional and recurrent neural networks).

Filter by
Sorted by
Tagged with
0 votes
1 answer
36 views

My custom neural network is converging but keras model not

in most cases it is probably the other way round but... I have implemented a basic MLP neural network structure with backpropagation. My data is just a shifted quadratic function with 100 samples. I ...
tymsoncyferki's user avatar
0 votes
0 answers
21 views

Mean Square Error not decreasing during gradient descent

I am currently writing a program which is supposed to implement gradient descent to train a prediction model. I am encountering an error whereby my MSE continuously increases, and the network never ...
Zaheer 's user avatar
0 votes
0 answers
15 views

XAI model to evaluate MLP

I need to build a XAI model and I don't know where to begin. I have seen different algorithms but can't think of how to create a model with them.Could anyone help me?
alex martinez's user avatar
0 votes
0 answers
16 views

eXplainable Artificial Intelligence (XAI). Need help building a XAI model to explain the results of an IDS classifier

I need some help building a XAI model with Keras to explain the results of an MLP working as an IDS. I have resarched about XAI but the only thing I find is small portions of code that just use ...
alex martinez's user avatar
0 votes
0 answers
21 views

Is it possible okay to use regression MLP for ordinal classification problem when target variable is numerical?

I have a target variable of 1-10 that represent difficulty level. These are individual classes represented by integers with 1 being the easiest and 10 most difficult. I have decided to use regression ...
Yoseph Ismail's user avatar
1 vote
1 answer
43 views

Finding parameter combinations for zero gradients in an artificial neural network

Consider the following network: There are two weights, say $w_1$ and $w_2$, and two biases, $b_1$ and $b_2$. The hidden layer has a ReLU activation function $g^{(1)}$ and the output layer has a ...
VJ123's user avatar
  • 147
0 votes
1 answer
36 views

What is the highest possible prediction accuracy when I flip some labels at random?

I want to predict MNIST labels in a binary setting using a simple MLP model (0 for digits 0-4 and 1 for 5-9). For the train and test data, I randomly flip 25% of the labels. Is the maximum achievable ...
Johannes97's user avatar
0 votes
0 answers
61 views

Need insights in how to reduce overfitting with MLPClassifier

I am new to data science. Please bear with me as I ask this long question. I am trying to do Speech Emotion Recognition with MLPCLassifier on RAVDESS and Crema datasets. I am predicting only three ...
tirednemo's user avatar
0 votes
0 answers
20 views

classification with rejection and how to interpret a 2D ambiguous data

Let's say we're going to train a classifier with the full data set. There's also a reject logic for ambiguous regions in the data. So, at the end, the final system outputs reject or 0 or 1. That is, ...
sci9's user avatar
  • 111
1 vote
2 answers
173 views

Neural network not learning at all

I am training a MLP on a tabular dataset, the pendigits dataset. Problem is that training loss and accuracy are more or less stable, while validation and test loss and accuracy are completely constant....
CasellaJr's user avatar
  • 229
1 vote
1 answer
398 views

How to determine which combinations of parameters to include in GridSearchCV

I am using MLPClassifier from sklearn and I would like to tune it with GridSearchCV. But I don't know which set of values to include for hidden_layer_sizes, max_iter, activation, solver, etc. How can ...
Penjan's user avatar
  • 11
0 votes
1 answer
179 views

Scikit-learn and TensorFlow with very different MLP models

I'm using Multilayer Perceptron ANNs at the very beginning of my project (it's a binary classification problem). Because it's simpler, I started with Scikit-learn. I got a magic result, with my model ...
Heliton Martins's user avatar
3 votes
1 answer
4k views

How can I Implement Dropout in SciKit-Learn?

I am working on an air-gapped PC and can only access the SciKit-Learn machine learning library. Unfortunately, its MLPClassifier doesn't include a Dropout ...
Connor's user avatar
  • 651
1 vote
1 answer
3k views

Failed to convert a NumPy array to a Tensor (Unsupported object type float) in Python

I am trying to build a MLP with Keras and an error appears. I do not have experience with neural networks so it is difficult for me. When I run the code for the NN after some time it says: ...
alex martinez's user avatar
1 vote
0 answers
30 views

Loss is very erratic in the 100s and val_loss is at 0, something - what is the reason for that?

I have a problem. I would like to solve a NLP classification problem. For this I have trained a CNN and since I have other features, I wanted to include them in the model training. Thus I have ...
Test's user avatar
  • 89
1 vote
1 answer
91 views

How to Improve MLP ANN accuracy

I am trying to improve the accuracy of my model over the UCI Breast Cancer Dataset. There's 426 records, and it is a binary classification model. ...
No_Name's user avatar
  • 11
0 votes
1 answer
319 views

Can MLP model sequential data?

When modeling sequential data, RNNs are introduced as an improvement of MLP as they can model the time dependency between the inputs. It is said that feeding the last N data points in the sequence to ...
Lukas Petersson's user avatar
0 votes
1 answer
54 views

Will summing features improve the Machine Learning models?

Assuming that I have two features, x and y for an MLP model. I know that depending on the model, the multiplication of features ...
Amged Elshiekh's user avatar
0 votes
1 answer
112 views

Spot Logistic Regression Training Error

My friend gave me this puzzle awhile ago and I've never figured it out. ...
Muddy Penguin's user avatar
0 votes
1 answer
36 views

What what will happen if all the layers of a MLP or any DL architecture are set as same in the beginning?

Setting the initial weights as all zeros will have the output dependent on the bias and setting the weights of all the neurons of a layer as same, will update the gradients in same way thus removing ...
Deshwal's user avatar
  • 323
0 votes
1 answer
450 views

Can a multilayer perceptron classify binary values?

I have a dataset in which the response variable is Sick(1) or not sick (2). As for the variables, there are a few numeric ones (2/14), all the others are variables by levels (example: 1-Abdominal pain,...
PicaR's user avatar
  • 314
0 votes
0 answers
25 views

Inbetween CNN and MLP: neural network architecture for "close to convolutional" problem?

I am looking to approximate an (expensive to calculate precisely) forward problem using a NN. Input and output are vectors of identical length. Although not linear, the output somewhat resembles a ...
Mav's user avatar
  • 1
0 votes
1 answer
153 views

How to improve the learning rate of an MLP for regression when tanh is used with the Adam solver as an activation function?

I'm trying to use an MLP to approximate a smooth function f : R^3 -> R, that takes a point in space as an argument, and returns a scalar value. The MLP architecture has a 3-dimensional (for 3 point ...
tmaric's user avatar
  • 160
2 votes
0 answers
580 views

Linear regression with Pytorch not converging

I am trying to perform a simple linear regression using Pytorch lightning (a network with only one neuron). The network is supposed to learn a simple function: y=-4x...
erap129's user avatar
  • 121
1 vote
1 answer
1k views

What does "expansion layer" mean?

Recently, I found "expansion layer" term in the next paper: Liu, Ze, et al. "Swin transformer: Hierarchical vision transformer using shifted windows." arXiv preprint arXiv:2103....
Leon Useinov's user avatar
1 vote
0 answers
28 views

Why there is a marked difference in metric scores using linear regression or MLP as readout for echo state network?

I am using a reservoir computing architecture comprising of an echo state network as per the paper Reservoir Computing Approaches for Representation and Classification of Multivariate Time Series ...
Jag's user avatar
  • 111
0 votes
0 answers
513 views

Improve model accuracy in multi-classification problem

I use a MLP to classify three different classes A, B, C. The loss function I use is categorical cross entropy and the optimiser ...
Insomniac's user avatar
1 vote
0 answers
31 views

Testing a Binary Classifier

I have been training a binary multilayer perceptron on a database made out of roughly 3600 0 values, and 4 1 values. Afterwards, I'm testing the MLP on a test set made out of 7 0 values and 7 1 ...
Joni Joni -al's user avatar
0 votes
1 answer
467 views

Is it possible that MLP has better accuracy than CNN?

I am working on the epilepsy classification system which consumes EEG signals and in the result says if withing the certain period is a seizure or not. I take an advantage of Keras API for the sake of ...
jwpol's user avatar
  • 101
0 votes
0 answers
49 views

Predicting Y Values Properly in a Regression Task using Scaled Values (Random Forest & MLP)

I have a supervised learning regression task: I am trying to forecast demand for a product based on sales in past years. Data description: Samples (rows) - Demand for a certain product (at a certain ...
G. M.'s user avatar
  • 1
0 votes
1 answer
325 views

Multiple solutions with same minima in MLP with same weights

I came across an excercise on deep learning from here. It goes as follows: Consider a simple MLP with a single hidden layer of $d$ dimensions in the hidden layer and a single output. Show that for any ...
scaraven's user avatar
1 vote
0 answers
26 views

Developing Custom MLP for Mnist

I am trying to develop a custom MLP for MNIST Dataset with 2 hidden fully connected layers Mnist: 28281 FC1: input 28*28, output 512 FC2: input 512, output 128 Classifier: FC: input 128, output 10 I ...
siya m's user avatar
  • 11
1 vote
0 answers
307 views

SHAP for Deep Neural Network taking long time

I have 60,000 samples with each having 1,800 features. I have made a multilayer perceptron in Keras and I want to use SHAP values to arrive at global feature importance. Is the matrix too big for SHAP?...
Kamyar Yazdani's user avatar
2 votes
1 answer
155 views

avoiding premature convergence with neural networks (EA's)

I am currently writing a program that would be able to play snake on an 25*25 grid. It works by optimizing a set of weights of 300 different solutions (each solution would be a different neural ...
Nick Stevens's user avatar
3 votes
1 answer
404 views

Why does the MAE still remain, at all?

This may seem to be a silly question. But I just wonder why the MAE doesn't reduce to values close to 0. It's the result of an MLP with 2 hidden layers and 6 neurons per hidden layer, trying to ...
Turnvater's user avatar
0 votes
1 answer
60 views

Why we use an activation function for introducing nonlinearity instead of a polynomial Perceptron implementation?

I perceive a single perceptron as a single linear function $y = a_1x_1 + a_2x_2 + ... + a_nx_n + b_0$ with a goal to calculate the best weights combination $ w_1, w_2, ..., w_n $ that minimizes the ...
geo199's user avatar
  • 3
6 votes
1 answer
6k views

Is a multi-layer perceptron exactly the same as a simple fully connected neural network?

I've been learning a little about StyleGans lately and somebody told me that a Multi-Layer Perceptron, MLP, is used in parts of the architecture for transforming noise. When I saw this person's code, ...
zipline86's user avatar
  • 369
1 vote
1 answer
34 views

Input changing row count matrices in an MLP

I want to input a numpy 2d array into MLP but I have an array of 50395 rows that contains many 2d array of shape (x, 129). x ...
K.J Fogang Fokoa's user avatar
2 votes
1 answer
4k views

What are the differences between MLP and DNN?

So I have been reading about the topic for a while, but i did not find a clear answer why MLP and DNN are being used interchangeably even though there are some differences between them. So far I have ...
MXK's user avatar
  • 184
0 votes
1 answer
303 views

Lower training accuracy than testing accuracy (MLP/Dropout)

I am working on a problem of multi-class classification by MLP. I have set dropout to each middle layer. Now I observe the training accuracy is around 10% less than ...
hola's user avatar
  • 103
1 vote
1 answer
79 views

model tuning by using loss curves

I have been practicing with the following dataset: http://archive.ics.uci.edu/ml/datasets/Concrete+Compressive+Strength for building a prediction model based on a MLP, but I have some doubts if the ...
Lila's user avatar
  • 227
3 votes
1 answer
532 views

Neural Network regression negative performance

I have a problem with the performance of a multi layer perceptron regressor (neural network) and I cannot figure out why. Task: I am trying to improve a time series prediction. I have predictions of a ...
Mark's user avatar
  • 31
0 votes
1 answer
86 views

How to structure the output layer of an MLP that finds the quadrant of an arbitrary point in a rectangle?

I'm trying to write a neural network that outputs the quadrant of a rectangle that an arbitrary point lies in. This rectangle has its upper left at {0, 0} and its lower right at {1, 1} (e.g. point {0....
Stewii's user avatar
  • 45
0 votes
1 answer
927 views

implementing forward and backward of a Linear model

I'm implementing the code of this abstraction. The forward is easy and looks like that: I don't understand the backward path and how it fit's the abstraction in the first image: Why is db defined as ...
Ilya.K.'s user avatar
  • 157
0 votes
1 answer
1k views

MLP classifier Gridsearch CV parameters to tune?

I'm looking to tune the parameters for sklearn's MLP classifier but don't know which to tune/how many options to give them? Example is learning rate. should i give it[.0001,.001,.01,.1,.2,.3]? or is ...
Joseph Hodson's user avatar
2 votes
2 answers
5k views

Feature scaling for MLP neural network sklearn

I am working with a dataset where the features have multiple scales. Before running scikit-learns's MLP neural network I was reading around and found a variety of different opinions for feature ...
Joseph Hodson's user avatar
1 vote
1 answer
233 views

Training loss stuck in the starting epochs but then starts decreasing. What could be the reason for it?

I am training a model where I found a unique problem that for starting 4 epochs, my loss did not change with the epochs but after that, it started changing. Could it be because of the high learning ...
Deshwal's user avatar
  • 323
4 votes
4 answers
3k views

Are weights of a neural network reset between epochs?

If an epoch is defined as the neural network training process after seeing the whole training data once. How is it that when starting the next epoch, the loss is almost always smaller than the first ...
user134132523's user avatar
0 votes
1 answer
1k views

(De-)Scaling/normalizing input and output data inside Keras model as layer

I am building a 2-hidden layer MLP using Keras. I'm using a SciKit learn wrapper to be able to use the GridSearchCV functionality. My sample-size is limited, ...
T. van der Heijden's user avatar
2 votes
1 answer
224 views

SciKit Learn: Multilayer perceptron early stopping, restore best weights

In the SciKit documentation of the MLP classifier, there is the early_stopping flag which allows to stop the learning if there is not any improvement in several ...
volperossa's user avatar