You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An error has been encountered when I run: python exampleinference.py
The error is as follows:
Traceback (most recent call last):
File "./pbnt-master/examples/exampleinference.py", line 82, in
inferenceExample()
File "./pbnt-master/examples/exampleinference.py", line 67, in inferenceExample
Q = engine.marginal(sprinkler)[0]
File "../lib/pbnt/Inference.py", line 257, in marginal
self.global_propagation()
File "../lib/pbnt/Inference.py", line 287, in global_propagation
self.collect_evidence(0, startClique, 0, True)
File "../lib/pbnt/Inference.py", line 297, in collect_evidence
self.collect_evidence(currentClique, neighbor, sep, 0)
File "../lib/pbnt/Inference.py", line 297, in collect_evidence
self.collect_evidence(currentClique, neighbor, sep, 0)
File "../lib/pbnt/Inference.py", line 301, in collect_evidence
self.pass_message(currentClique, prevClique, sepset)
File "../lib/pbnt/Inference.py", line 315, in pass_message
oldSepsetPotential = self.project(fromClique, sepset)
File "../lib/pbnt/Inference.py", line 324, in project
sepset.potential = clique.potential.marginalize(sepset.potential)
File "../lib/pbnt/Distribution.py", line 66, in marginalize
index = self.generate_index_node(seq, intersect)
File "../lib/pbnt/Distribution.py", line 94, in generate_index_node
return self.generate_index(index, axes)
File "../lib/pbnt/Distribution.py", line 105, in generate_index
tmp[axis] = index
ValueError: shape mismatch: value array of shape (3,) could not be broadcast to indexing result of shape (2,)
I use python2.7 with Mac OS. Can you help me?
The text was updated successfully, but these errors were encountered:
An error has been encountered when I run:
python exampleinference.py
The error is as follows:
I use python2.7 with Mac OS. Can you help me?
The text was updated successfully, but these errors were encountered: