private-pgm
private-pgm copied to clipboard
torch_example.py not working
I am trying to run torch_example.py but I am getting the following error:
Traceback (most recent call last):
File "/Users/jakeetaylor/private-pgm/examples/torch_example.py", line 68, in <module>
model = engine.estimate(measurements, total=total, engine='RDA')
File "/Users/jakeetaylor/private-pgm/.venv/lib/python3.10/site-packages/mbi/inference.py", line 77, in estimate
self.dual_averaging(measurements, total, **options)
File "/Users/jakeetaylor/private-pgm/.venv/lib/python3.10/site-packages/mbi/inference.py", line 180, in dual_averaging
_, g = self._marginal_loss(u) # not interested in loss of this query point
File "/Users/jakeetaylor/private-pgm/.venv/lib/python3.10/site-packages/mbi/inference.py", line 270, in _marginal_loss
diff = c*(Q @ x - y)
TypeError: unsupported operand type(s) for -: 'numpy.ndarray' and 'Tensor'