Skip to main content

All Questions

1 vote
0 answers
35 views

Neural Network backpropagation algorithm only partially training in python

I am writing a neural network to identify digits from the MNIST database. It's primarily based on this code https://github.com/SebLague/Neural-Network-Experiments My neural network appears to be ...
Jonpaco23's user avatar
0 votes
1 answer
281 views

Why does my MLP model's loss explode when using softmax and cross entropy in Python?

I am writing an NLP model from scratch in Python, using only NumPy for most of the functions. import numpy as np # my loss and activation functions def relu(x): return np.maximum(0, x) def ...
Capta1n_n9m0's user avatar
0 votes
0 answers
69 views

How to correctly backpropagate in a fully connected Neural Network?

I'm trying to write a neural network from scratch and It seems that I have misunderstood something or done something wrong because my model is not performing as well as it should. Can someone help me ...
Moe's user avatar
  • 196
0 votes
1 answer
69 views

Python-coded neural network does not learn properly

My network is not trained to recognize inputs separately, it either outputs the averaged result or becomes biased to one particular output. What am I doing wrong? import numpy as np sigmoid = lambda ...
Kaiyakha's user avatar
  • 2,011
2 votes
2 answers
515 views

Calculating gradient of NN in pure python

import numpy # Data and parameters X = numpy.array([[-1.086, 0.997, 0.283, -1.506]]) T = numpy.array([[-0.579]]) W1 = numpy.array([[-0.339, -0.047, 0.746, -0.319, -0.222, -0.217], ...
Pazu's user avatar
  • 287
-2 votes
1 answer
32 views

where is the mistake in this neural network implementation?

I recently started to learn deep learning and I tried to write a forward and backward propagation from the beginning but I think there is a problem with my code so I know this is hard to find the ...
Reza halzd's user avatar
1 vote
1 answer
73 views

Backpropagation bug

I am trying to implement backpropagation from scratch. While my cost is decreasing, gradient check yields a whooping 0.767399376130221. I've been trying to figure out what's wrong and managed to slim ...
mojbius's user avatar
  • 95
2 votes
1 answer
405 views

How to perform back propagation with different sized layers?

I'm developing my first neural network, using the well known MNIST database of handwritten digit. I want the NN to be able to classify a number from 0 to 9 given an image. My neural network consists ...
Julen's user avatar
  • 1,144
0 votes
1 answer
67 views

Numpy Backprop Cost is Not Decreasing

I'm working on a python script that allows the user to define the number of hidden layers and their number of nodes in fully connected neural network. The problem is, the error is coming up as nan ...
yupthatsme's user avatar
4 votes
1 answer
4k views

How to correctly calculate gradients in neural network with numpy

I am trying to build a simple neural network class from scratch using numpy, and test it using the XOR problem. But the backpropagation function (backprop) does not seem to be working correctly. In ...
jhanreg11's user avatar
0 votes
1 answer
422 views

Weights in Numpy Neural Net Not Updating, Error is Static

I'm trying to build a neural network on the Mnist dataset for a HW assignment. I'm not asking anyone to DO the assignment for me, I'm just having trouble figuring out why the Training accuracy and ...
yupthatsme's user avatar
0 votes
0 answers
296 views

Error regarding shapes not aligned back propagation

I am a newbie to machine learning and currently learning through Michael Nielsen's website... I am currently running code for handwritten digit recognition... The code is perfectly the same as given ...
Talha Wahab's user avatar
-3 votes
2 answers
1k views

How to calculate gradient descent cost for the weights using a dot product? [closed]

I'm trying to reproduce a neural network from http://neuralnetworksanddeeplearning.com/chap2.html What i don't get is why they can calculate the gradient descent for the weights by taking a dot ...
Sivan Duijn's user avatar
1 vote
0 answers
169 views

neural network predicting same output class for every input while training also

I'm implementing a neural network using backpropogation algorithm in python.the method used is similar to that taught by Andrew Ng in his Machine Learning course. But the NN is predicting same class ...
Aditya Birhman's user avatar
1 vote
1 answer
326 views

How to Input my Training Data into this Neural Network

I'm trying to solve a classification problem with a specific piece of code, and I'm having trouble understanding exactly how my data is to be fed into the Neural Network. I started encoding the data ...
junfanbl's user avatar
  • 461

15 30 50 per page