Open daisylab opened 1 year ago
Using str lookups was the old API, try using the foursided_objects
directly and not its str name.
If that works, it would be great if you could open up a PR to help update the docs
Unfortunately, using foursided_objects
did not work, which I somewhat expected, because we did not declare that at all.
In fact, the foursided_objects
which we are looking for is actually the query
, and it can be found by:
query = Exists(x, foursides(x))
print(model[query].true_groundings)
Hello, it's me again.
I was able to produce the result shown in the tutorial. However, after updating the LNN package to the master branch, the tutorial code no longer works.
the expected output is {'c', 'k'}
, but the code just says set()
.
query = Exists(x, foursides(x))
model.add_knowledge(square, rectangle, square_rect, rect_foursides, query, world=World.AXIOM)
model.add_data({square: {'c': Fact.TRUE, 'k': Fact.TRUE}})
model.infer()
print(model[query].true_groundings)
after adding world=World.AXIOM, I got the result
While trying to replicate the result from the educational examples, I've got this error.
https://ibm.github.io/LNN/education/examples/reasoning.html#simple-geometry-reasoning-example
result:
how did I do to patch the error: