Closed zhaoguangyuan123 closed 3 years ago
Hi! What version of the code are you using?
Hi,
I get a bit confused about version.
But I just git clone your_repo
and then do thepip install -e .
. The verision is version="0.1.0",
Could you expand on your question if information here is insufficient?
best guangyuan
Fair enough. So you cloned the master branch or the DiCE branch?
yes, i cloned the master branch.
Alright, can you try the DiCE branch? The master branch is pretty outdated :) (I am going to improve that soonish)
Sure. I am going to check that branch right away and keep u updated. Thanks
I tried "git clone --branch dice --single-branch https://github.com/HEmile/storchastic.git" and then re-run the introduction.py in the examples folder.
However, I still get the same bug.
Did i miss any steps?
best Guangyuan
Hi Guanyuan, You're right, I wasn't running on torch 1.8.1. Looks like they have a breaking change somewhere. I just pushed a fix https://github.com/HEmile/storchastic/commit/4b464df1395dcacbf46409632a16f006a677dae9 on the dice branch, introduction.py runs properly for me now. Thanks for the report!
I use python=3.8 and pytorch=1.8.1 and test the example
bernoulli_toy.py
Error happens in the following line in expect.pylog_probs = tensor.distribution.log_prob(tensor)
error isValueError: The value argument to log_prob must be a Tensor
Seems .log_prob() wants a tensor object as input. When I print the 'tensor', it outputs:
Could you offer some solutions? Thank you