1
$\begingroup$

As we all know Keras backend uses Tensorflow and so it should give out same kind of results when we provide same parameters, hyper-parameters, weights and biases initialisation at each layer, but still the accuracy is different.

This maybe because of the batches of images which are fed at each step in both the models are not identical and as it gets shuffled randomly.

Is there any way in which we can make sure that the same batch of images are fed into the model while eliminating the randomness?

$\endgroup$
  • $\begingroup$ Keras can use other backends other than TF. Anyway, you should ask this question on Data Science SE or Stack Overflow. $\endgroup$ – nbro Sep 19 '19 at 13:21
  • $\begingroup$ I have set keras backend as tf $\endgroup$ – Subham Tiwari Sep 19 '19 at 13:37
  • $\begingroup$ Have you set seed in both cases? $\endgroup$ – ashenoy Sep 19 '19 at 13:56
  • $\begingroup$ yes i have used the same seed as 43 $\endgroup$ – Subham Tiwari Sep 19 '19 at 14:08
  • $\begingroup$ Seed for both numpy and tensorflow? $\endgroup$ – ashenoy Sep 20 '19 at 7:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.