Tag for questions about Multi layer perceptrons (MLP). It is a class of feedforward artificial neural network. Multilayer perceptrons are sometimes colloquially referred to as "vanilla" neural networks, especially when they have a single hidden layer
Questions tagged [mlp]
275 questions
0
votes
0 answers
Predicting an output with a different size than the input using a MLP model
I would like to use a MLP model for a regression problem. The goal is to use several input data to predict 1 output data. My input size is (7726, 7, 7) and want to predict and output data of size is (7726, 7).
I tried using dense layers but I can't…

Pierre Lamart
- 1
- 1
0
votes
0 answers
Need insights on 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 getting high validation loss and large training-validation accuracy gap.
I…
0
votes
0 answers
Training NN to map quantities into a grid
I created a simple NN (multi-layer percetpron acutally) in pytorch that takes a vector of quantities as an input and outputs an assignment map so that the products with the biggest quantities are placed the closest to the origin of the 2d map (the…

Clément
- 1
0
votes
0 answers
Did I store the training loss and validation loss in a wrong way?
Did I store the training loss and validation loss in a wrong way? Because the training loss is greater than the validation loss somehow.
def train(dataloader, model, loss_fn, optimizer):
size = len(dataloader.dataset)
model.train()
…

ZeL
- 1
0
votes
0 answers
UNet image infilling with both image and categorical data
I'm working on a project where I have both image data and numeric categorical data for each image. The categorical data is not pixel-dependent, it's like a label. So one data entry might look like: [ $image$, $number$, $number$ ]. The goal is to…
0
votes
0 answers
Implementing gradient descent in keras
for my project, I defined a model with sequential with 3 dense hidden layers with different numbers of neurons in each layer. Then I compiled and built it with an input shape.
My question is, is it possible to get weights (using model.get_weights)…
0
votes
0 answers
Trying to implement the RFE function from sci kit learn but getting the error 'AttributeError: 'list' object has no attribute 'ndim'
Here's a non Negative MLP regressor I created
def relu(x):
return np.maximum(x, 0)
class NonNegativeRegressor(MLPRegressor):
def __init__(self, hidden_layer_sizes=(100,), activation='relu', solver='adam', #hidden_layer_sizes=(1,100) this…
0
votes
0 answers
Numerical Prediction with MX-Gluon ends up in a loop
I'm trying to build a small MLP Network to predict some numerical values. The input are 6 different paramaters and the result should be a prediction of the target value. The MLP consists of 2 hidden layers and 1 output layer with exactly one Neuron.…

SickerDude43
- 168
- 8
0
votes
0 answers
How do you combine Convolutional Layers and an MLP
I'm trying to make a model for a deep neural network that has a backbone like this:
Each block should have a certain number of convolutional layers (lets say 3)
It should also have a linear layer.
The input is processed through average pooling, the…
0
votes
1 answer
How to save all batches prediction results in PyTorch?
I want to use mlp do prediction(98 vectors of 100), when I save the results, there only 7 vectors(batch=10, the output of one batch). Even if I set batch=90, I saved 7 vectors.
I want to know how could I save all baches results?
I save it as…

kkk123
- 11
- 2
0
votes
0 answers
Jax fitting MLP gives different result than Tensorflow
I need to build a MLP in Jax, but I get slightly different (and in my opinion inaccurate) result from Jax respect to a MLP created in Tensorflow.
In both cases I created a dataset where the y are linear function of X plus a standard gaussian error,…

fabianod
- 501
- 4
- 17
0
votes
1 answer
PySpark ArrayIndexOutOfBoundsException error during model fit: How can I diagnose and fix the issue?
I am working on a PySpark project where I'm trying to fit a MultilayerPerceptronClassifier model to my text data using the fit method.I am using the Word2ve model provided bu Mllib to extract features . However, I keep running into an…

Ibtissam Youb
- 1
- 2
0
votes
0 answers
backpropagation with momentum for MLP
I'm trying to implement backpropagation with momentum but in trainig loop instead of getting smaller loss, i get higher and higher
I have written such function for backpropagation. I have checked code many times and to be honest I can't notice any…

Ben
- 19
- 2
0
votes
0 answers
Machine Learning Time Series Estimation - Mysterious Phenomenon
I tried fitting a MLP to my time series which contains lots of missing values.
The idea was to interpolate the missing values with the trained model.
This approach works remarkably well as you can see in the image Result
However it only works well…
0
votes
1 answer
Key Error : 1 while testing my testing samples and trying to print out the MSE
I am practicing Using MLP to simulate the 10x10 table. I thought I had figured it out but I'm getting a KeyError:1 in the section below.
I am unable to figure out what I need to change to get the correct output. [This is the output on this…

Wandondi
- 3
- 4