If you test with a given z and y, you should get very similar values between your version and the official one.
You should check that this is the case first.
Then if this the true and the training behavior are still different, you can try with different random seeds. Sometimes, the random initialization can have a significant impact on the speed of convergence of the network.