Browse Source

[ENH] transfer datasets to learning

pull/1/head
Gao Enhao 1 year ago
parent
commit
3508768d61
11 changed files with 35 additions and 26 deletions
  1. +1
    -0
      abl/learning/__init__.py
  2. +1
    -1
      abl/learning/basic_nn.py
  3. +0
    -0
      abl/learning/torch_dataset/__init__.py
  4. +0
    -0
      abl/learning/torch_dataset/classification_dataset.py
  5. +0
    -0
      abl/learning/torch_dataset/prediction_dataset.py
  6. +0
    -0
      abl/learning/torch_dataset/regression_dataset.py
  7. +0
    -7
      docs/API/abl.dataset.rst
  8. +17
    -1
      docs/API/abl.learning.rst
  9. +1
    -2
      docs/index.rst
  10. +1
    -1
      examples/hed/bridge.py
  11. +14
    -14
      examples/mnist_add/mnist_add.ipynb

+ 1
- 0
abl/learning/__init__.py View File

@@ -1,4 +1,5 @@
from .abl_model import ABLModel
from .basic_nn import BasicNN
from .torch_dataset import *

__all__ = ["ABLModel", "BasicNN"]

+ 1
- 1
abl/learning/basic_nn.py View File

@@ -8,7 +8,7 @@ import numpy
import torch
from torch.utils.data import DataLoader

from ..dataset import ClassificationDataset, PredictionDataset
from .torch_dataset import ClassificationDataset, PredictionDataset
from ..utils.logger import print_log




abl/dataset/__init__.py → abl/learning/torch_dataset/__init__.py View File


abl/dataset/classification_dataset.py → abl/learning/torch_dataset/classification_dataset.py View File


abl/dataset/prediction_dataset.py → abl/learning/torch_dataset/prediction_dataset.py View File


abl/dataset/regression_dataset.py → abl/learning/torch_dataset/regression_dataset.py View File


+ 0
- 7
docs/API/abl.dataset.rst View File

@@ -1,7 +0,0 @@
abl.dataset
==================

.. automodule:: abl.dataset
:members:
:undoc-members:
:show-inheritance:

+ 17
- 1
docs/API/abl.learning.rst View File

@@ -1,7 +1,23 @@
abl.learning
==================

.. automodule:: abl.learning
Learning
--------

.. autoclass:: abl.learning.ABLModel
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: abl.learning.BasicNN
:members:
:undoc-members:
:show-inheritance:

Torch Dataset
-------------

.. automodule:: abl.learning.torch_dataset
:members:
:undoc-members:
:show-inheritance:

+ 1
- 2
docs/index.rst View File

@@ -32,11 +32,10 @@
:maxdepth: 1
:caption: API

API/abl.dataset
API/abl.data
API/abl.learning
API/abl.reasoning
API/abl.bridge
API/abl.data
API/abl.utils

.. toctree::


+ 1
- 1
examples/hed/bridge.py View File

@@ -4,7 +4,7 @@ from collections import defaultdict
import torch

from abl.bridge import SimpleBridge
from abl.dataset import RegressionDataset
from abl.learning.torch_dataset import RegressionDataset
from abl.data.evaluation import BaseMetric
from abl.learning import ABLModel, BasicNN
from abl.reasoning import Reasoner


+ 14
- 14
examples/mnist_add/mnist_add.ipynb View File

@@ -13,7 +13,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
@@ -42,7 +42,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
@@ -61,7 +61,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {},
"outputs": [
{
@@ -110,7 +110,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"metadata": {},
"outputs": [
{
@@ -170,7 +170,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
@@ -198,7 +198,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"metadata": {},
"outputs": [
{
@@ -229,7 +229,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
@@ -245,7 +245,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 8,
"metadata": {},
"outputs": [
{
@@ -295,7 +295,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
@@ -319,7 +319,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 10,
"metadata": {},
"outputs": [
{
@@ -352,7 +352,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
@@ -385,7 +385,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
@@ -404,7 +404,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
@@ -420,7 +420,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [


Loading…
Cancel
Save