Skip to content

Instantly share code, notes, and snippets.

"""
In Funsor it is possible to program entirely without batch dimensions
for a subset of PyTorch and Jax (including eliminating the batch/event
dimension distinction in the PyTorch and NumPyro/TFP distribution APIs).
Here is a simplified version of the mean computation in @murphyk's regression example.
"""
import torch
import funsor
funsor.set_backend("torch")
@eb8680
eb8680 / pypy_patch.patch
Created November 2, 2018 00:32
patch problematic parts
diff --git a/torch/__init__.py b/torch/__init__.py
index 83b88c246..96fe05813 100644
--- a/torch/__init__.py
+++ b/torch/__init__.py
@@ -279,7 +279,7 @@ import torch.multiprocessing
import torch.sparse
import torch.utils.backcompat
import torch.onnx
-import torch.jit
+# import # torch.jit