A couple of things:

Check whether the networks are initialized the same way.
Check whether you have the same optimizer parameters. AFAIK, by default the Adam optimizer in Keras has learning rate of 1e-3.

Would be good if you can feed the minibatches in the same order when debugging.