From 32b38415535a7a0311cb644b3fddad47b438c401 Mon Sep 17 00:00:00 2001 From: Vishwak Srinivasan Date: Thu, 8 Mar 2018 23:51:12 +0530 Subject: [ready] General documentation improvements (#5450) * Improvize documentation 1. Add formula for erf, erfinv 2. Make exp, expm1 similar to log, log1p 3. Symbol change in ge, le, ne, isnan * Fix minor nit in the docstring * More doc improvements 1. Added some formulae 2. Complete scanning till "Other Operations" in Tensor docs * Add more changes 1. Modify all torch.Tensor wherever required * Fix Conv docs 1. Fix minor nits in the references for LAPACK routines * Improve Pooling docs 1. Fix lint error * Improve docs for RNN, Normalization and Padding 1. Fix flake8 error for pooling * Final fixes for torch.nn.* docs. 1. Improve Loss Function documentation 2. Improve Vision Layers documentation * Fix lint error * Improve docstrings in torch.nn.init * Fix lint error * Fix minor error in torch.nn.init.sparse * Fix Activation and Utils Docs 1. Fix Math Errors 2. Add explicit clean to Makefile in docs to prevent running graph generation script while cleaning 3. Fix utils docs * Make PYCMD a Makefile argument, clear up prints in the build_activation_images.py * Fix batch norm doc error --- docs/Makefile | 7 ++++++- docs/source/scripts/build_activation_images.py | 3 +-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/Makefile b/docs/Makefile index 210cbc7400..2a63943f00 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -7,13 +7,14 @@ SPHINXBUILD = sphinx-build SPHINXPROJ = PyTorch SOURCEDIR = source BUILDDIR = build +PYCMD = python # Put it first so that "make" without argument is like "make help". help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) figures: - python source/scripts/build_activation_images.py + @$(PYCMD) source/scripts/build_activation_images.py docset: html doc2dash --name $(SPHINXPROJ) --icon $(SOURCEDIR)/_static/img/pytorch-logo-flame.png --enable-js --online-redirect-url http://pytorch.org/docs/ --force $(BUILDDIR)/html/ @@ -28,3 +29,7 @@ docset: html # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile figures @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +clean: + @echo "Removing everything under 'build'.." + @rm -r $(BUILDDIR)/html/ $(BUILDDIR)/doctrees diff --git a/docs/source/scripts/build_activation_images.py b/docs/source/scripts/build_activation_images.py index 1b50d4a1fa..b737762b8c 100644 --- a/docs/source/scripts/build_activation_images.py +++ b/docs/source/scripts/build_activation_images.py @@ -67,7 +67,6 @@ for function_name in functions: plot_path = os.path.join(ACTIVATION_IMAGE_PATH, function_name + ".png") if not os.path.exists(plot_path): function = torch.nn.modules.activation.__dict__[function_name]() - print(function) # Start a new plot pylab.clf() @@ -91,5 +90,5 @@ for function_name in functions: pylab.ylim([-7, 7]) # And save it - print(plot_path) pylab.savefig(plot_path) + print('Saved activation image for {} at {}'.format(function, plot_path)) -- cgit v1.2.3