Upon searching the net, I found the problem. It seems like that keras over tensorflow when running on a GPU tends to produce results that are not reproducible when transfered to a non-GPU machine. This most likely has something to do with the cuDNN installed. cuDNN's maxpooling and some convolution backward algorithm is non-deterministic - as said from a forum.

Solutions I found say the use of `numpy.random.seed(seed_no)`

right before calling any keras libraries. This works when you run the code **on a CPU**. Works with both *keras/theano* and *keras/tensorflow*.

Solution for **GPU users** using keras over theano involves modifying the .theanorc file into:

```
[dnn.conv]
algo_bwd_filter = deterministic
algo_bwd_data = deterministic
```

Or using theano flags: `THEANO_FLAGS="dnn.conv.algo_bwd_filter=deterministic,dnn.conv.algo_bwd_data=deterministic" python rnn_model.py`

However, I haven't found any clear instructions yet of how to produce uniform results on a keras with tensorflow as back-end running on a GPU.