Browse Source

[DOC] add images to MNIST Add example

pull/1/head
Gao Enhao 2 years ago
parent
commit
a3895f07cf
2 changed files with 16 additions and 2 deletions
  1. +1
    -1
      docs/Brief-Introduction/Usage.rst
  2. +15
    -1
      docs/Examples/MNISTAdd.rst

+ 1
- 1
docs/Brief-Introduction/Usage.rst View File

@@ -42,7 +42,7 @@ In the MNIST Add example, the machine learning model looks like

.. 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")
criterion = torch.nn.CrossEntropyLoss()
optimizer = torch.optim.Adam(cls.parameters(), lr=0.001, betas=(0.9, 0.99))


+ 15
- 1
docs/Examples/MNISTAdd.rst View File

@@ -1,5 +1,19 @@
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.

Loading…
Cancel
Save