| @@ -42,7 +42,7 @@ In the MNIST Add example, the machine learning model looks like | |||||
| .. code:: python | .. code:: python | ||||
| cls = LeNet5(num_classes=len(kb.pseudo_label_list)) | |||||
| cls = LeNet5(num_classes=10) | |||||
| device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") | device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") | ||||
| criterion = torch.nn.CrossEntropyLoss() | criterion = torch.nn.CrossEntropyLoss() | ||||
| optimizer = torch.optim.Adam(cls.parameters(), lr=0.001, betas=(0.9, 0.99)) | optimizer = torch.optim.Adam(cls.parameters(), lr=0.001, betas=(0.9, 0.99)) | ||||
| @@ -1,5 +1,19 @@ | |||||
| MNIST Add | MNIST Add | ||||
| ================== | ================== | ||||
| .. contents:: Table of Contents | |||||
| MNIST Add was first introduced in [1] and the inputs of this task are pairs of MNIST images and the outputs are their sums. The dataset looks like this: | |||||
| .. image:: ../img/image_1.png | |||||
| :width: 350px | |||||
| :align: center | |||||
| | | |||||
| The ``gt_pseudo_label`` is only used to test the performance of the machine learning model and is not used in the training phase. | |||||
| In the Abductive Learning framework, the inference process is as follows: | |||||
| .. image:: ../img/image_2.png | |||||
| :width: 700px | |||||
| [1] Robin Manhaeve, Sebastijan Dumancic, Angelika Kimmig, Thomas Demeester, and Luc De Raedt. Deepproblog: Neural probabilistic logic programming. In Advances in Neural Information Processing Systems 31 (NeurIPS), pages 3749-3759.2018. | |||||