Projects

Here are some of my projects:

ScryNeuro

A high-performance bridge between Scryer Prolog and Python, designed for neural predicate embedding.

example:

:- op(700, xfx, :=).
:- use_module('prolog/scryer_py').

basic :-
py_init,
X := py_eval("1 + 2"),
py_to_int(X, Val),
format("Result: ~d~n", [Val]),
py_free(X),
py_finalize.

neural :-
py_init,
py_exec("\
import torch\n\
x = torch.tensor([1.0, 2.0, 3.0, 4.0, 5.0])\n\
y = x * x"),
py_eval("float(x.norm())", NormH),
py_to_float(NormH, Norm),
format("norm([1..5]) = ~f~n", [Norm]),
py_free(NormH),
py_finalize.

:- initialization((
basic,
neural
)).
% output:
% Result: 3
% norm([1..5]) = 7.416198

https://github.com/sporeking/ScryNeuro

NJUIS-Students.github.io

A non-governmental Wiki spontaneously created and maintained by students from the School of Intelligent Science and Technology at Nanjing University.

https://njuis-students.github.io/