Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add normal distribution to random engines #1352

Merged
merged 2 commits into from Jul 6, 2018
Merged

Add normal distribution to random engines #1352

merged 2 commits into from Jul 6, 2018

Conversation

nhynes
Copy link
Member

@nhynes nhynes commented Jun 28, 2018

This PR adds functionality for sampling from an isotropic Gaussian distribution to `contrib.random. This PR implements the ziggurat algorithm.

@tqchen tqchen self-requested a review July 3, 2018 02:29
@@ -55,4 +55,29 @@ def uniform(low, high, size):
return _api.extern(size, [], lambda ins, outs: _intrin.call_packed(
"tvm.contrib.random.uniform", float(low), float(high), outs[0]), dtype='float32')


def normal(mean, stddev, size):
Copy link
Member

Choose a reason for hiding this comment

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

make API arguments consistent when there is numpy API available,
https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.normal.html

@tqchen tqchen added status: review in progress status: need update need update based on feedbacks labels Jul 3, 2018
@tqchen
Copy link
Member

tqchen commented Jul 5, 2018

@nhynes can you act on the comment?

@tqchen
Copy link
Member

tqchen commented Jul 5, 2018

@nhynes please also update the naming convention of python API and docstring

@nhynes
Copy link
Member Author

nhynes commented Jul 5, 2018

fixed. sorry for the oversight

@tqchen tqchen merged commit 941f684 into apache:master Jul 6, 2018
@tqchen tqchen added status: accepted and removed status: need update need update based on feedbacks status: review in progress labels Jul 6, 2018
@nhynes nhynes deleted the sgx-randn branch July 6, 2018 17:03
tqchen pushed a commit to tqchen/tvm that referenced this pull request Jul 6, 2018
mnuyens pushed a commit to mnuyens/tvm that referenced this pull request Jul 10, 2018
sergei-mironov pushed a commit to sergei-mironov/tvm that referenced this pull request Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants