Constraints symmetric#68240
Conversation
CI Flow Status⚛️ CI FlowRuleset - Version:
You can add a comment to the PR and tag @pytorchbot with the following commands: # ciflow rerun, "ciflow/default" will always be added automatically
@pytorchbot ciflow rerun
# ciflow rerun with additional labels "-l <ciflow/label_name>", which is equivalent to adding these labels manually and trigger the rerun
@pytorchbot ciflow rerun -l ciflow/scheduled -l ciflow/slowFor more information, please take a look at the CI Flow Wiki. |
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit dfdfa3a (more details on the Dr. CI page):
🕵️ 19 new failures recognized by patternsThe following CI failures do not appear to be due to upstream breakages:
|
|
Hello, @albanD. May I have a chance to be reviewed my PR? I am trying to contribute to PyTorch by implementing distributions for symmetric matrices like Wishart distribution and Inverse Wishart distribution. Although there is a LKJ distribution for the cholesky decomposition of correlation matrices, it only represents equivalence to restricted form of Wishart distribution. Thus, I started implementing Wishart distribution and Inverse Wishart distribution seperately. Before sending the PR of distributions, I added a short code about the 'torch.distributions.constraints.symmetric', which was not included in 'torch.distributions.constraints' previously. i.e., 'torch.distributions.constraints' contains module like 'positive_definite' constraints, but it just assumes symmetricity of the input matrix. (Link) So, I think it will be better if we have symmetric constraint in PyTorch. We may further utilize it like Thanks. |
|
Sure, @fritzo would you have some time to take a look? |
…ch into constraints_symmetric
|
Sorry for triggering review request. I selected wrong commit to revert. It is my bad. |
Fix revert mistake
|
Sorry for the confusion. Making another PR. |
…he tensor is symmetric at last 2 dimension. (#68644) Summary: Implemented submodule for #68050 Opened cleaned, final version of PR for #68240 Explanation: I am trying to contribute to PyTorch by implementing distributions for symmetric matrices like Wishart distribution and Inverse Wishart distribution. Although there is a LKJ distribution for the Cholesky decomposition of correlation matrices, it only represents equivalence to restricted form of Wishart distribution. [https://arxiv.org/abs/1809.04746](https://arxiv.org/abs/1809.04746) Thus, I started implementing Wishart distribution and Inverse Wishart distribution seperately. I added a short code about the 'torch.distributions.constraints.symmetric', which was not included in 'torch.distributions.constraints' previously. i.e., 'torch.distributions.constraints' contains module like 'positive_definite' constraints, but it just assumes symmetricity of the input matrix. [Link](https://github.com/pytorch/pytorch/blob/1adeeabdc0c8832420c091c5c668843768530d7f/torch/distributions/constraints.py#L466) So, I think it will be better if we have constraint checking symmetricity of the tensors in PyTorch. We may further utilize it like `constraints.stack([constraints.symmetric, constraints.positive_definite])` for the constraint of the covariance matrix in Multivariate Normal distribution, for example, to check if the random matrix is a symmetric positive definite matrix. cc fritzo neerajprad alicanb nikitaved Pull Request resolved: #68644 Reviewed By: jbschlosser Differential Revision: D32599540 Pulled By: neerajprad fbshipit-source-id: 9227f7e9931834a548a88da69e4f2e9af7732cfe
…he tensor is symmetric at last 2 dimension. (#68644) Summary: Implemented submodule for #68050 Opened cleaned, final version of PR for #68240 Explanation: I am trying to contribute to PyTorch by implementing distributions for symmetric matrices like Wishart distribution and Inverse Wishart distribution. Although there is a LKJ distribution for the Cholesky decomposition of correlation matrices, it only represents equivalence to restricted form of Wishart distribution. [https://arxiv.org/abs/1809.04746](https://arxiv.org/abs/1809.04746) Thus, I started implementing Wishart distribution and Inverse Wishart distribution seperately. I added a short code about the 'torch.distributions.constraints.symmetric', which was not included in 'torch.distributions.constraints' previously. i.e., 'torch.distributions.constraints' contains module like 'positive_definite' constraints, but it just assumes symmetricity of the input matrix. [Link](https://github.com/pytorch/pytorch/blob/1adeeabdc0c8832420c091c5c668843768530d7f/torch/distributions/constraints.py#L466) So, I think it will be better if we have constraint checking symmetricity of the tensors in PyTorch. We may further utilize it like `constraints.stack([constraints.symmetric, constraints.positive_definite])` for the constraint of the covariance matrix in Multivariate Normal distribution, for example, to check if the random matrix is a symmetric positive definite matrix. cc fritzo neerajprad alicanb nikitaved Reviewed By: jbschlosser Differential Revision: D32599540 Pulled By: neerajprad fbshipit-source-id: 9227f7e9931834a548a88da69e4f2e9af7732cfe [ghstack-poisoned]
…he tensor is symmetric at last 2 dimension. (pytorch#68644) Summary: Implemented submodule for pytorch#68050 Opened cleaned, final version of PR for pytorch#68240 Explanation: I am trying to contribute to PyTorch by implementing distributions for symmetric matrices like Wishart distribution and Inverse Wishart distribution. Although there is a LKJ distribution for the Cholesky decomposition of correlation matrices, it only represents equivalence to restricted form of Wishart distribution. [https://arxiv.org/abs/1809.04746](https://arxiv.org/abs/1809.04746) Thus, I started implementing Wishart distribution and Inverse Wishart distribution seperately. I added a short code about the 'torch.distributions.constraints.symmetric', which was not included in 'torch.distributions.constraints' previously. i.e., 'torch.distributions.constraints' contains module like 'positive_definite' constraints, but it just assumes symmetricity of the input matrix. [Link](https://github.com/pytorch/pytorch/blob/7abc01e565acc86230389219613c349495b283a6/torch/distributions/constraints.py#L466) So, I think it will be better if we have constraint checking symmetricity of the tensors in PyTorch. We may further utilize it like `constraints.stack([constraints.symmetric, constraints.positive_definite])` for the constraint of the covariance matrix in Multivariate Normal distribution, for example, to check if the random matrix is a symmetric positive definite matrix. cc fritzo neerajprad alicanb nikitaved Pull Request resolved: pytorch#68644 Reviewed By: jbschlosser Differential Revision: D32599540 Pulled By: neerajprad fbshipit-source-id: 9227f7e9931834a548a88da69e4f2e9af7732cfe
Opened PR again.
Implemented Symmetric matrices 'torch.distributions.constraints' for implementing