Skip to content

Conversation

@lcy-seso
Copy link
Contributor

@lcy-seso lcy-seso commented Jan 30, 2018

fix #7796

  • Aad a new attribute fix_seed instead of using seed=0 to represent using a random seed. By considering that currently an attribute must always be set and 0 is also a fixed seed.
@lcy-seso lcy-seso force-pushed the fix_dropout branch 2 times, most recently from 9706ea1 to c3bccf6 Compare January 30, 2018 10:55

def dropout(x, dropout_prob, is_test=False, seed=0, **kwargs):
def dropout(x, dropout_prob, is_test=False, seed=None, **kwargs):
"""
Copy link
Contributor

Choose a reason for hiding this comment

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

it's better to set with 0. Our default value equals 0 in dropout op.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the seed is set to 0, it will be a fixed seed 0, not a random seed. So if I miss something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here when the seed is set to None, a random seed will be used.

Copy link
Contributor

@dzhwinter dzhwinter left a comment

Choose a reason for hiding this comment

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

Looks Good

@lcy-seso lcy-seso merged commit c52c0d6 into PaddlePaddle:develop Jan 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants