mlp

Pytorch mat1 and mat2 must have the same dtype mlp

Pytorch mat1 and mat2 must have the same dtype mlp Question: So i am trying to do a function that trains an mlp using PyTorch. My code is as follows : def mlp_gradient_descent(x,y , model , eta = 1e-6 , nb_iter = 30000) : loss_descent = [] dtype = torch.float device = torch.device("cpu") x = …

Total answers: 1

can't classify the inputs of an formula by output.(celcius-fahrenheit)

can't classify the inputs of an formula by output.(celcius-fahrenheit) Question: I am learning deep learning for a while by myself. However, I try to build a classification model in pytorch. The input and output can be taken from formula of celcius-fahrenheit. C = (F-32)/1.8 The inputs are value of fahrenheit and the outputs are classified …

Total answers: 1

Update Parameters method gives the same initial and updated values – MLP ANN

Update Parameters method gives the same initial and updated values – MLP ANN Question: I have written an MLP ANN code for a binary classification dataset and am getting 0.88 (88%) Accuracy for my training dataset. My Testing dataset gives me 0.37 – 0.55 Accuracy. I noticed this was due to my parameters not being …

Total answers: 1

Outputting the prediction scores from MLP keras inferencing

Outputting the prediction scores from MLP keras inferencing Question: Following the keras tutorial MLP classification here: https://keras.io/examples/nlp/multi_label_classification/. I am able to successfully train a model and print out the top 3 predicted labels using the code below. I would also like to print out the prediction scores too. I can’t seem to find how to …

Total answers: 2

Self-built Neural Network

Self-built Neural Network Question: I have been trying to build a simple neural network myself (3 layers) to predict the MNIST dataset. I referenced some codes online and wrote some parts my own, the code runs without any errors, but something is wrong with the learning process. The trained network always gives me wrong predictions, …

Total answers: 1