Questions tagged [numpy]

For questions related to the NumPy library that are NOT just about programming issues (which are off-topic here).

5 questions
4
votes
1 answer

Why is my derivation of the back-propagation equations inconsistent with Andrew Ng's slides from Coursera?

I am using the cross-entropy cost function to calculate its derivatives using different variables $Z, W$ and $b$ at different instances. Please refer image below for calculation. As per my knowledge, my derivation is correct for $dZ, dW, db$ and…
learner
  • 151
  • 5
2
votes
2 answers

How can I perform lossless compression of images so that they can be stored to train a CNN?

I have a set of images, which are quite large in size (1000x1000), and as such do not easily fit into memory. I'd like to compress these images, such that little information is missing. I am looking to use a CNN for a reinforcement learning task…
1
vote
0 answers

What is the most accurate way of building a Perceptron using only NumPy?

For context, I am trying to write a bunch of neural network programs using no other packages besides NumPy for educational purposes. I am trying to make them as simple as possible, i.e. removing the features that might help training or testing, but…
user55176
1
vote
1 answer

Value Iteration failing to converge to optimal value function in Sutton-Barto's Gambler problem

In Example 4.3:Gambler's Problem of Sutton and Barto's book whose code is given here. In this code the value function array is initialized as np.zeros(states) where states $\in[0,100]$ and the value function for optimal policy which is returned…
0
votes
1 answer

Why do smaller weights converge faster for RNNs?

I am writing a Recurrent Neural Network using only the NumPy library for a binary classification problem. When I initialize the weights with np.random.randn, after 1000 epochs it gets ~60% accuracy, whereas when I divide the weights by 1000 first,…