Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #141 from DerThorsten/master
Browse files Browse the repository at this point in the history
docs and examples update
  • Loading branch information
DerThorsten committed Aug 15, 2018
2 parents 90179a8 + daf65be commit 57cf4dd
Show file tree
Hide file tree
Showing 13 changed files with 72 additions and 227 deletions.
9 changes: 8 additions & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,11 @@ These files need to be in the github repository.
.. warning::

Do not make changes to `inferno/docs/inferno-apidoc` This folder is auto-generated
by the above mentioned command.
by the above mentioned command.

The following combines all the commands necessary to build the html documentation:

.. code:: bash
./build_docs.sh
6 changes: 6 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,9 @@ History
------------------

* setup.py critical bugix in install procedure



CURRENT CHANGES
-----------------
* Flexible Unet
7 changes: 3 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Current features include:
* `various utility layers <https://github.com/nasimrahaman/inferno/tree/master/inferno/extensions/layers>`_ with more underway,
* `a submodule <https://github.com/nasimrahaman/inferno/blob/master/inferno/io/volumetric>`_ for volumetric datasets, and more!





Expand Down Expand Up @@ -152,10 +152,9 @@ Planned features include:
Credits
---------
All contributors are listed here_.
.. _here: https://inferno-pytorch.github.io/inferno/html/authors.html

.. _here: https://pytorch-inferno.readthedocs.io/en/latest/authors.html

This packag was partially generated with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template + lots of work by Thorsten.
This package was partially generated with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template + lots of work by Thorsten.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
Expand Down
6 changes: 6 additions & 0 deletions build_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
cd docs
rm -r -f inferno-apidoc
sphinx-apidoc -o inferno-apidoc ../inferno
make html
cd ..
1 change: 1 addition & 0 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ requirements:
- dill
- networkx 1.11
- tensorboardx
- sphinx_rtd_theme


test:
Expand Down
10 changes: 5 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def __getattr__(cls, name):

# General information about the project.
project = u'inferno'
copyright = u"2017, Nasim Rahaman"
copyright = u"2018, f"

# The version info for the project you're documenting, acts as replacement
# for |version| and |release|, also used in various other places throughout
Expand Down Expand Up @@ -207,7 +207,7 @@ def __getattr__(cls, name):

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a
# theme further. For a list of options available for each theme, see the
Expand Down Expand Up @@ -306,7 +306,7 @@ def __getattr__(cls, name):
latex_documents = [
('index', 'inferno.tex',
u'inferno Documentation',
u'Nasim Rahaman', 'manual'),
u'Inferno Team', 'manual'),
]

# The name of an image file (relative to this directory) to place at
Expand Down Expand Up @@ -337,7 +337,7 @@ def __getattr__(cls, name):
man_pages = [
('index', 'inferno',
u'inferno Documentation',
[u'Nasim Rahaman'], 1)
[u'Inferno Team'], 1)
]

# If true, show URL addresses after external links.
Expand All @@ -352,7 +352,7 @@ def __getattr__(cls, name):
texinfo_documents = [
('index', 'inferno',
u'inferno Documentation',
u'Nasim Rahaman',
u'Inferno Team',
'inferno',
'One line description of project.',
'Miscellaneous'),
Expand Down
22 changes: 19 additions & 3 deletions docs/inferno-apidoc/inferno.extensions.layers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ inferno.extensions.layers.device module
:undoc-members:
:show-inheritance:

inferno.extensions.layers.identity module
-----------------------------------------

.. automodule:: inferno.extensions.layers.identity
:members:
:undoc-members:
:show-inheritance:

inferno.extensions.layers.prefab module
---------------------------------------

Expand All @@ -44,6 +52,14 @@ inferno.extensions.layers.prefab module
:undoc-members:
:show-inheritance:

inferno.extensions.layers.res\_unet module
------------------------------------------

.. automodule:: inferno.extensions.layers.res_unet
:members:
:undoc-members:
:show-inheritance:

inferno.extensions.layers.reshape module
----------------------------------------

Expand All @@ -60,10 +76,10 @@ inferno.extensions.layers.sampling module
:undoc-members:
:show-inheritance:

inferno.extensions.layers.unet module
-------------------------------------
inferno.extensions.layers.unet\_base module
-------------------------------------------

.. automodule:: inferno.extensions.layers.unet
.. automodule:: inferno.extensions.layers.unet_base
:members:
:undoc-members:
:show-inheritance:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,13 @@ def forward(self, predictions, target):
)

# Build trainer
trainer = Trainer(model) \
.build_criterion(MySideLoss()) \
.build_optimizer('Adam') \
.validate_every((10, 'epochs')) \
.save_every((10, 'epochs')) \
.save_to_directory(SAVE_DIRECTORY) \
.set_max_num_epochs(40) \
trainer = Trainer(model)
trainer.build_criterion(MySideLoss())
trainer.build_optimizer('Adam')
trainer.validate_every((10, 'epochs'))
#trainer.save_every((10, 'epochs'))
#trainer.save_to_directory(SAVE_DIRECTORY)
trainer.set_max_num_epochs(40)

# Bind loaders
trainer \
Expand All @@ -176,7 +176,7 @@ def forward(self, predictions, target):
# and visualize the results

# predict:
trainer.load(best=True)
#trainer.load(best=True)
trainer.bind_loader('train', train_loader)
trainer.bind_loader('validate', validate_loader)
trainer.eval_mode()
Expand Down
2 changes: 1 addition & 1 deletion examples/plot_unet_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def label_transform(x):
# With :code:`activated=False` we make sure that the last layer
# is not activated since we chain the UNet with a sigmoid
# activation function.
from inferno.extensions.layers.unet import ResBlockUNet
from inferno.extensions.layers import ResBlockUNet
from inferno.extensions.layers import RemoveSingletonDimension

model = torch.nn.Sequential(
Expand Down
106 changes: 0 additions & 106 deletions examples/res_unet.py

This file was deleted.

94 changes: 0 additions & 94 deletions examples/train_unet.py

This file was deleted.

0 comments on commit 57cf4dd

Please sign in to comment.