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
0 answers
15 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 ...
3 votes
1 answer
404 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 ...
  • 417
0 votes
0 answers
28 views

How to develop custom MLP in PyTorch, using own text dataset

I have a basic understanding of MLP's and neural networks but I am completely lost on how to start when trying to implement it in code. I am trying to develop a multilayer perceptron model to ...
0 votes
0 answers
19 views

Multi-class classification MLP not working as it should

I'm trying to building a MLP. After executing the accuracy is 87,35%. I thought i was having good results. However, when painting the confussion matrix and the classification report i see the accuracy ...
1 vote
0 answers
31 views

Problem with dimension of multiclass classification

I'm building a MLP and after executing I obtained a 87.35 accuracy value, with is really good. However, when painting the confussion matrix and the classification report i see the accuracy is just for ...
0 votes
0 answers
25 views

High loss value in Multi-class classification with MLP

I am building a Multi-class classification MLP and when i execute the code the loss value is really high. What do i need to change? I am using the UNSW-NB15 dataset. After encoding the categorical ...
1 vote
1 answer
587 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: ...
1 vote
0 answers
22 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 ...
  • 89
0 votes
1 answer
20 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. ...
0 votes
0 answers
5 views

Variation of hidden layers for multilayer perceptron made the result worsen

I trained a model using a multilayer perceptron. My dataset is a tabular dataset. The imbalance ratio is 4:1 (No:Yes). It's a binary classification problem. I achieved a recall of 0.535 when I select ...
  • 359
0 votes
1 answer
50 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 ...
0 votes
0 answers
25 views

In AlphaStar (and in general), how are NNs trained in series?

Looking at this diagram of their architecture, they have a series of neural nets (NNs) that, together, dictate the move to take. To my understanding, the order of data passing from input to output is:...
  • 1
0 votes
1 answer
19 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 ...
0 votes
0 answers
6 views

Why does neural randiance fields use two MLPs?

In the NeRF ECCV 2020 paper, the authors use stratified (uniform) sampling and hierarchical sampling for better results. But I don't understand the reason for using two MLPs. Why can't both stratified ...
0 votes
1 answer
73 views

Spot Logistic Regression Training Error

My friend gave me this puzzle awhile ago and I've never figured it out. ...
0 votes
1 answer
27 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 ...
  • 323
0 votes
0 answers
29 views

Null Inputs/Inhibiting Inputs & Outputs with Scikit-Learn MLPRegressor

I'm trying to build a general predictive model of a model of a machine. I've got a variable number of sensor inputs, and I'd like to create a MLPRegressor that can estimate outputs from the input ...
0 votes
0 answers
62 views

What is the difference between keras tuned hyperparameters and manually defined Sequential model with same hyperparameters?

I have a dataset that I divided into 10 splits of training, validation and test sets for a regression problem. I used the first split and RandomSearch in ...
  • 1
0 votes
1 answer
74 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,...
  • 302
0 votes
0 answers
22 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 ...
  • 1
0 votes
1 answer
79 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 ...
  • 140
2 votes
0 answers
322 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...
  • 121
1 vote
1 answer
460 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....
1 vote
0 answers
27 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 ...
  • 111
0 votes
0 answers
250 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 ...
1 vote
0 answers
29 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 ...
0 votes
1 answer
193 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 ...
  • 101
0 votes
0 answers
37 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 ...
  • 1
0 votes
1 answer
250 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 ...
1 vote
0 answers
20 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 ...
  • 11
1 vote
0 answers
212 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?...
2 votes
1 answer
68 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 ...
3 votes
1 answer
383 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 ...
0 votes
1 answer
47 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 ...
  • 3
4 votes
1 answer
3k 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, ...
  • 329
1 vote
1 answer
22 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 ...
2 votes
1 answer
3k 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 ...
  • 174
0 votes
1 answer
191 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 ...
  • 103
1 vote
1 answer
34 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 ...
  • 211
3 votes
1 answer
251 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 ...
  • 31
0 votes
1 answer
70 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....
  • 45
0 votes
1 answer
176 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 ...
  • 157
0 votes
1 answer
960 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 ...
2 votes
2 answers
3k 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 ...
1 vote
1 answer
142 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 ...
  • 323
3 votes
4 answers
2k 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 ...
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, ...
2 votes
1 answer
145 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 ...
0 votes
1 answer
164 views

PyTorch MultiLayer Perceptron Classification Size of Features vs Labels Wrong

I am getting the following error: ...
1 vote
0 answers
18 views

Which MSE (total or individual) back-propagate for multi out regression neural network

When we have multi output regression neural network, we can calculate total MSE and individual MSE per output. How this MSE should back-propagate ? Shouldn't we back-propagate individual MSE through ...
  • 11