Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

torch_example.py not working #10

Open
jakee417 opened this issue Dec 27, 2023 · 0 comments
Open

torch_example.py not working #10

jakee417 opened this issue Dec 27, 2023 · 0 comments

Comments

@jakee417
Copy link

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'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant