Skip to content

Fix lab1 dense layer output assertion #118

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

prashantkhurana
Copy link

@prashantkhurana prashantkhurana commented Mar 29, 2023

Fix lab1 assertion dense layer output assertion :

  1. tf.random.set_seed only sets the global seed https://www.tensorflow.org/api_docs/python/tf/random/set_seed

  2. we need to set keras set_random_seed to make all seeds be deterministic.

docs : https://www.tensorflow.org/api_docs/python/tf/config/experimental/enable_op_determinism, https://www.tensorflow.org/api_docs/python/tf/keras/utils/set_random_seed.enable_op_determinism might not be needed here but its good to have.

Fixes #116

@prashantkhurana prashantkhurana changed the title Fix lab1 assertion dense layer output assertion Fix lab1 dense layer output assertion Mar 29, 2023
1) tf.random.set_seed only sets the global seed https://www.tensorflow.org/api_docs/python/tf/random/set_seed
2) we need to set keras set_random_seed to make all seeds be deterministic. docs : https://www.tensorflow.org/api_docs/python/tf/config/experimental/enable_op_determinism, https://www.tensorflow.org/api_docs/python/tf/keras/utils/set_random_seed.

enable_op_determinism might not be needed here but its good to have.

fixes MITDeepLearning#116
Copy link

@jacobhq jacobhq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this worked for me!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lab1, Part1: Assertion fails
4 participants