Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Fix multivariate normal bug #21105

Merged
merged 1 commit into from
Jul 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix multivariate normal bug
  • Loading branch information
hankaj committed Jul 22, 2022
commit 339f568561758c34a972f7069b56a0947c3c1b56
2 changes: 1 addition & 1 deletion python/mxnet/numpy_op_fallback.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def forward(self, is_train, req, in_data, out_data, aux):
scale = _mx_np.linalg.cholesky(cov)
#set context
noise = _mx_np.random.normal(size=out_data[0].shape, dtype=loc.dtype, device=loc.device)
out = loc + _mx_np.einsum('...jk,...j->...k', scale, noise)
out = loc + _mx_np.einsum('...jk,...k->...j', scale, noise)
self.assign(out_data[0], req[0], out)

def backward(self, req, out_grad, in_data, out_data, in_grad, aux):
Expand Down