uclnlp / ctp Goto Github PK
View Code? Open in Web Editor NEWConditional Theorem Proving
License: MIT License
Conditional Theorem Proving
License: MIT License
It seems that hoppy-nkb-cli.py
do not contain the show_rules
function. So how can I print rules when I want to run this code on the Kinship dataset?
Python: 3.8.5
Torch: 1.7.1
Cuda: 11.0 (yet it was disabled through CUDA_VISIBLE_DEVICES)
I got few problems with data types (torch Embeddings
required LongTensor
instead of IntTensor
). Yet when I specified tensor types explicitly - you can see https://github.com/alex4321/ctp - I got problems running test_smart_clutrr_v5
in test_smart_clutrr.py
:
(lines 515-520)
np.testing.assert_allclose(inf0_np, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], rtol=1e-1, atol=1e-1)
np.testing.assert_allclose(inf1_np, [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], rtol=1e-1, atol=1e-1)
np.testing.assert_allclose(inf2_np, [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], rtol=1e-1, atol=1e-1)
np.testing.assert_allclose(inf3_np, [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], rtol=1e-1, atol=1e-1)
np.testing.assert_allclose(inf4_np, [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0], rtol=1e-1, atol=1e-1)
But I got next values:
INF0 tensor([3.5844e-08, 1.0600e-08, 6.5727e-09, 1.8932e-08, 7.4809e-09, 7.8440e-09,
8.1592e-09, 2.4311e-08, 1.3718e-08, 4.8176e-07, 1.1065e-08, 2.0157e-07])
INF1 tensor([9.9900e-01, 1.3420e-06, 1.2384e-06, 3.3722e-06, 1.8620e-06, 6.9090e-06,
1.5691e-06, 4.7638e-06, 4.3208e-06, 1.7816e-06, 1.1471e-06, 4.2599e-07])
INF2 tensor([9.9900e-01, 7.9380e-06, 1.4266e-06, 3.9714e-06, 3.3722e-06, 9.3712e-06,
6.9090e-06, 4.7638e-06, 5.5142e-06, 2.6228e-06, 1.9439e-06, 1.1219e-06])
INF3 tensor([9.9900e-01, 7.9380e-06, 2.6228e-06, 5.5142e-06, 3.3722e-06, 9.3712e-06,
6.9090e-06, 4.7638e-06, 5.5142e-06, 2.6228e-06, 1.9439e-06, 1.3885e-06])
INF4 tensor([9.9900e-01, 7.9380e-06, 2.6228e-06, 5.5142e-06, 3.9714e-06, 9.3712e-06,
6.9090e-06, 4.7638e-06, 5.5142e-06, 2.6228e-06, 1.9439e-06, 1.3885e-06])
So only first two assertions passes.
(test_classic.py
works fine with the same data, so I guess it should be some problem with kbcr.clutrr.models.smart.NeuralKB
, kbcr.clutrr.models.smart.Hoppy
? Also, previous tests test_smart_clutrr_v1
- test_smart_clutrr_v4
passed succesfully too)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.