where what line ? where what line ?

  
      github.com
  
  
    Isawyou/dqn-numpy-only-not-working/blob/c91a1b788523497f52ca6497c604851e76a97c3a/dqn numpy only/actor_net.py#L104

    
    next_x = None
    
    #Adam update formula,                                                 #
    config['t'] += 1
    config['m'] = config['beta1']*config['m'] + (1-config['beta1'])*dx
    config['v'] = config['beta2']*config['v'] + (1-config['beta2'])*(dx**2)
    mb = config['m'] / (1 - config['beta1']**config['t'])
    vb = config['v'] / (1 - config['beta2']**config['t'])
  
    next_x = x - config['learning_rate'] * mb / (np.sqrt(vb) + config['epsilon'])
    return next_x, config
def _uniform_init(self, input_size, output_size):
    u = np.sqrt(6./(input_size+output_size))
    return np.random.uniform(-u, u, (input_size, output_size))



  
  
    
    
  
  



I dont see that …

The chain rule says you should multiply the gradient with the derivative of the current function.
If I understand correctly that this 2 tries to compute the gradient wrt of the output of the first linear, then you’re definitely missing a grad_a or out1 somewhere in that formula.

well can you just refix the code

As I said above, writing this kind of code by hand would take way too much time as there are so many places where you can make subtle mistakes. I’m afraid I don’t have the time to do that for you.

I hate using frameworks because they solve things for you without understanding a nible of what they do

Yes, but depending on what you want to do, you don’t need to understand all the details.
And even if you do understand all the details, it does not mean that you can re-implement the whole thing, bug-free, easily.