Skip to content

Commit

Permalink
Merge pull request #7 from dingguanglei/development
Browse files Browse the repository at this point in the history
docs
  • Loading branch information
dingguanglei committed Oct 25, 2018
2 parents 2bec247 + 95adb68 commit e435196
Show file tree
Hide file tree
Showing 13 changed files with 154 additions and 53 deletions.
9 changes: 7 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
import os
import sys
#sys.path.insert(0, os.path.abspath('../../'))
sys.path.insert(0, os.path.abspath('../../'))
import jdit

# -- Project information -----------------------------------------------------
Expand All @@ -40,8 +40,13 @@
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.viewcode',
]


# Add any paths that contain templates here, relative to this directory.
templates_path = ['ntemplates']

Expand Down Expand Up @@ -81,7 +86,7 @@
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}
html_theme_options = {}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down
50 changes: 50 additions & 0 deletions docs/source/dataset.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
.. role:: hidden
:class: hidden-section

jdit.dataset
============

.. automodule:: jdit.dataset
.. currentmodule:: jdit.dataset

Dataloaders_factory
-------------------

.. autoclass:: Dataloaders_factory
:members:

Hand_mnist
----------

.. autoclass:: Hand_mnist
:members:

Fashion_mnist
-------------

.. autoclass:: Fashion_mnist
:members:

Cifar10
-------

.. autoclass:: Cifar10
:members:

Lsun
----

.. autoclass:: Lsun
:members:

get_mnist_dataloaders
---------------------
.. autofunction:: get_mnist_dataloaders

get_fashion_mnist_dataloaders
-----------------------------
.. autofunction:: get_fashion_mnist_dataloaders

get_lsun_dataloader
-------------------
.. autofunction:: get_lsun_dataloader
62 changes: 12 additions & 50 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,61 +1,23 @@
.. jdit documentation master file, created by
sphinx-quickstart on Thu Oct 25 09:05:01 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Welcome to jdit's documentation!
================================

.. toctree::
:maxdepth: 3
:caption: Contents:

dataset
============

.. automodule:: dataset
:members:

model
==========
:glob:
:maxdepth: 1
:caption: Notes

.. automodule:: model
:members:

optimizer
==============

.. automodule:: optimizer
:members:

jdit.trainer.super
==================

.. automodule:: jdit.trainer.super
:members:

jdit.trainer.classification
===========================

.. automodule:: jdit.trainer.classification
:members:

jdit.trainer.gan.generate
=========================

.. automodule:: jdit.trainer.gan.generate
:members:

jdit.trainer.instances.fashingClassification
============================================

.. automodule:: jdit.trainer.instances.fashingClassification
:members:
.. toctree::
:maxdepth: 1
:caption: Package Reference

dataset
model
optimizer
trainer
metric

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
* :ref:`search`
15 changes: 15 additions & 0 deletions docs/source/metric.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.. role:: hidden
:class: hidden-section

jdit.Metric
==========

.. automodule:: jdit.metric
.. currentmodule:: jdit.metric

Metric
-----

.. autoclass:: metric
:members:

15 changes: 15 additions & 0 deletions docs/source/model.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.. role:: hidden
:class: hidden-section

jdit.model
==========

.. automodule:: jdit
.. currentmodule:: jdit

Model
-----

.. autoclass:: jdit.Model
:members:

15 changes: 15 additions & 0 deletions docs/source/optimizer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.. role:: hidden
:class: hidden-section

jdit.optimizer
==========

.. automodule:: jdit
.. currentmodule:: jdit

Optimizer
-----

.. autoclass:: jdit.Optimizer
:members:

26 changes: 26 additions & 0 deletions docs/source/trainer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.. role:: hidden
:class: hidden-section

jdit.trainer
============

.. automodule:: jdit.trainer
.. currentmodule:: jdit.trainer

SupTrainer
-----

.. autoclass:: SupTrainer
:members:

GanTrainer
-----

.. autoclass:: GanTrainer
:members:

FashingClassTrainer
-------------------

.. autoclass:: FashingClassTrainer
:members:
5 changes: 5 additions & 0 deletions jdit/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from .model import Model
from .optimizer import Optimizer
# from .dataset import *
from .trainer import *
from .metric import *
1 change: 1 addition & 0 deletions jdit/metric/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .inception import Metric
1 change: 0 additions & 1 deletion jdit/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from torch.nn import init, Conv2d, Linear, ConvTranspose2d, InstanceNorm2d, BatchNorm2d, DataParallel
from torch import save, load


class Model(object):
"""a model
Expand Down
4 changes: 4 additions & 0 deletions jdit/trainer/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from .super import *
from .classification import *
from .gan import *
from .instances import *
1 change: 1 addition & 0 deletions jdit/trainer/gan/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .generate import GanTrainer
3 changes: 3 additions & 0 deletions jdit/trainer/instances/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .fashingClassification import FashingClassTrainer,start_example

__all__ = ['FashingClassTrainer', 'start_example']

0 comments on commit e435196

Please sign in to comment.