Commit Graph

12 Commits

Author SHA1 Message Date
Edward Z. Yang
3bf922a6ce Apply UFMT to low traffic torch modules (#106249)
Signed-off-by: Edward Z. Yang <ezyang@meta.com>

Pull Request resolved: https://github.com/pytorch/pytorch/pull/106249
Approved by: https://github.com/Skylion007
2023-07-29 23:37:30 +00:00
anjali411
3bcc19b29a Add __all__ to various submodules in torch.fx, distributions, distributed, package (#80367)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/80367
Approved by: https://github.com/albanD
2022-06-27 21:27:30 +00:00
Juhyeong (Odd) Kim
c77857cb83 Improve numerical stability of torch.distributions.wishart.Wishart (#72993)
Summary:
Maintanance of https://github.com/pytorch/pytorch/pull/70377
Multiple modifications of the merged initial implementation of Wishart distribution.

Key modifications:
* torch/distributions/wishart.py: Clamp (Clip) float type values to calculate reciprocal in numerically stable manner, by using the eps value paired to each torch.dtype
* test/distributions/test_distributions.py: Test Wishart distribution implementation in numerically unstable zones, i.e df values are at ndim - 1 < df < ndim where ndim is the one dimenstion of the Wishart parameter & sample matrix.

Re-opened reverted PR https://github.com/pytorch/pytorch/issues/72059
cc neerajprad vadimkantorov

Pull Request resolved: https://github.com/pytorch/pytorch/pull/72993

Reviewed By: samdow

Differential Revision: D34853807

Pulled By: neerajprad

fbshipit-source-id: eb62dca19bf8a934fdf59b4ffc58587447fe8378
(cherry picked from commit 99240c0d947e2faeb7beae91164ede41f61d8448)
2022-03-15 18:30:08 +00:00
Nikita Shulga
0b117a3956 Revert D34245091: [pytorch][PR] Improve numerical stability of torch.distributions.wishart.Wishart
Test Plan: revert-hammer

Differential Revision:
D34245091 (5343cfe949)

Original commit changeset: 1cd653c1d5c6

Original Phabricator Diff: D34245091 (5343cfe949)

fbshipit-source-id: 90975456c5290b162da493ba0ef0a35920c73857
(cherry picked from commit 452fab8217)
2022-02-16 21:40:07 +00:00
Kim Juhyeong
5343cfe949 Improve numerical stability of torch.distributions.wishart.Wishart (#72059)
Summary:
Maintanance of https://github.com/pytorch/pytorch/issues/70377
Multiple modifications of the merged initial implementation of Wishart distribution.
cc neerajprad

Key modifications:
- `torch/distributions/wishart.py`: Clamp (Clip) float type values to calculate reciprocal in numerically stable manner, by using the `eps` value paired to each `torch.dtype`
- `test/distributions/test_distributions.py`: Test Wishart distribution implementation in numerically unstable zones, i.e `df` values are at `ndim - 1 < df < ndim` where `ndim` is the one dimenstion of the Wishart parameter & sample matrix.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/72059

Reviewed By: H-Huang

Differential Revision: D34245091

Pulled By: neerajprad

fbshipit-source-id: 1cd653c1d5c663346433e84fd0bbe2e590790908
(cherry picked from commit ef1da3ba46)
2022-02-16 16:39:44 +00:00
Igor Fedan
75309b45f3 explicitly provide memory format when calling to clone() at Indexing.cpp
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/28660

Test Plan: Imported from OSS

Differential Revision: D18333346

Pulled By: ifedan

fbshipit-source-id: 06590205d883a5096388a4ae318389244130972d
2019-11-07 05:38:32 -08:00
Tongzhou Wang
2e311d2003 update exp. family doc (#18118)
Summary:
sphinx doesn't understand hyphen. it does not merge the two halves together in html.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18118

Differential Revision: D14498012

Pulled By: mrshenli

fbshipit-source-id: d6f4cfddc0a8e3a8f91578da43c26ca9c6fff3ce
2019-03-17 21:39:42 -07:00
Tongzhou Wang
93768785ec fix exp fam. formula
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/17719

Differential Revision: D14349029

Pulled By: soumith

fbshipit-source-id: cf016756a9319436f7379e8377f8bd1e1b672b40
2019-03-06 15:47:13 -08:00
Vishwak Srinivasan
3cbaa6b785 [ready] Clean up torch.distributions (#8046) 2018-06-02 16:54:53 +02:00
Tongzhou Wang
1c01eabd3c
Codemod to update our codebase to 0.4 standard (#6641)
* Codemod to update our codebase to 0.4 standard

* Update some of the test scri[ts

* remove Variable in test_clip_grad_value

* fix _symbolic_override_wrapper_maker
2018-04-17 22:06:54 -04:00
Tongzhou Wang
47ee86776e Fix CPU torch.multinomial with noncontiguous prob tensor (#5093)
* fix CPU torch.multinomial not working on noncontiguous probability distn'

* address comments

* change some tabs to spaces in THStorage.c
2018-02-06 22:11:43 -05:00
Vishwak Srinivasan
85a7e0fc41 Addition of ExponentialFamily (#4876) 2018-02-04 12:18:28 +01:00