def delta_weights(self, act0, tgt):
        d_w, d_b = self.init_weights(0), self.init_biases()
        inps, acts = self.propagate_fwd_all(act0)
        j, k = self.n_l-2, self.n_l-1
        sens = [None] * self.n_l # pre-initialize SENSitivity arrays
        d_w[j], d_b[k], sens[k] = self.delta_w_jk(tgt-acts[k], inps[k], acts[j])
        for i in reversed(range(self.n_l-2)):
            j, k = i+1, i+2
            d_w[i], d_b[j], sens[j] = self.delta_w_ij(inps[j], self.w[j], sens[k], acts[i])
        return d_w, d_b
dataset/ETHPy150Open deprofundis/deprofundis/backprop.py/BackpropNetwork.delta_weights/original