EditorΒΆ

You can edit the following DeepProbLog program. The model that will evaluate the program and queries has access to a network for handwritten digit classification called mnist_net. Images of handwritten digits are available using the syntax test(<index>) to select the image with index <index>. See the illustration down below for some images and their corresponding indeces.

ProbLog online
% Your model here nn(mnist_net,[X],Y,[0,1,2,3,4,5,6,7,8,9]) :: digit(X,Y). number([],Result,Result). number([H|T],Acc,Result) :- digit(H,Nr), Acc2 is Nr+10*Acc,number(T,Acc2,Result). number(X,Y) :- number(X,0,Y). multi_addition(X,Y,Z) :- number(X,X2),number(Y,Y2), Z is X2+Y2. addition(X,Y,Z) :- digit(X,X2), digit(Y,Y2), Z is X2+Y2. % Queries query(addition(tensor(test(0)),tensor(test(1)), X)).
_images/test_digits_with_index.jpg