Skip to content

Conversation

pengli09
Copy link
Contributor

@pengli09 pengli09 commented Nov 1, 2017

No description provided.

tensor2 = numpy.array(scope.find_var("Out").get_tensor())

false_num = (tensor1 != tensor2).sum()
self.assertGreater(false_num, int(0.95 * 1000 * 784))
Copy link
Member

Choose a reason for hiding this comment

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

I am curious about why the rate is 0.95

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a personal choice. Although tensor1 and tensor2 are sampled randomly, some values may still be identical by chance. So I choose a not-so-big, not-so-small value. I'll add a comment for it.

@pengli09
Copy link
Contributor Author

pengli09 commented Nov 2, 2017

Add comments for the ratio 0.95 used in uniform_random_random_seed_test() and gaussian_random_random_seed_test().

@luotao1
Copy link
Contributor

luotao1 commented Feb 1, 2019

感谢您给PaddlePaddle贡献代码。由于Paddle V1/V2版本已不再维护,相关代码也已从develop分支上删除,因此关闭您的PR,欢迎您向Paddle最新版-Fluid贡献代码。
Thanks for contributing to PaddlePaddle! Since V1/V2 will not be maintained anymore, and related codes have been deleted from develop branch as well, we close this PR. Welcome to contribute to Fluid——the latest version of PaddlePaddle.

@luotao1 luotao1 closed this Feb 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants