Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
|
|
2 years ago | |
|---|---|---|
| .. | ||
| datasets | 2 years ago | |
| weights | 2 years ago | |
| README.md | 2 years ago | |
| hwf.ipynb | 2 years ago | |
| main.py | 2 years ago | |
| requirements.txt | 2 years ago | |
This example shows a simple implementation of Handwritten Formula task, where handwritten images of decimal formulas and their computed results are given, alongwith a domain knowledge base containing information on how to compute the decimal formula. The task is to recognize the symbols (which can be digits or operators '+', '-', '×', '÷') of handwritten images and accurately determine their results.
pip install -r requirements.txt
python main.py
usage: main.py [-h] [--no-cuda] [--epochs EPOCHS] [--lr LR]
[--weight-decay WEIGHT_DECAY] [--batch-size BATCH_SIZE]
[--loops LOOPS] [--segment_size SEGMENT_SIZE]
[--save_interval SAVE_INTERVAL] [--max-revision MAX_REVISION]
[--require-more-revision REQUIRE_MORE_REVISION]
[--ground] [--max-err MAX_ERR]
MNIST Addition example
optional arguments:
-h, --help show this help message and exit
--no-cuda disables CUDA training
--epochs EPOCHS number of epochs in each learning loop iteration
(default : 1)
--lr LR base learning rate (default : 0.001)
--weight-decay WEIGHT_DECAY
weight decay value (default : 0.03)
--batch-size BATCH_SIZE
batch size (default : 32)
--loops LOOPS number of loop iterations (default : 5)
--segment_size SEGMENT_SIZE
segment size (default : 1/3)
--save_interval SAVE_INTERVAL
save interval (default : 1)
--max-revision MAX_REVISION
maximum revision in reasoner (default : -1)
--require-more-revision REQUIRE_MORE_REVISION
require more revision in reasoner (default : 0)
--ground use GroundKB (default: False)
--max-err MAX_ERR max tolerance during abductive reasoning (default : 1e-10)
An efficient Python toolkit for Abductive Learning (ABL), a novel paradigm that integrates machine learning and logical reasoning in a unified framework.
Python other