Commit c7c514c2 authored by yangzhong's avatar yangzhong
Browse files

push 2.0.9 version

parent cf967b1f
\def\indices{{0, 0, 1, 0, 2, 2, 3, 3}}
\def\inputs{{5, 1, 7, 2, 3, 2, 1, 3}}
\def\outputs{{"$\frac{8}{3}$", "$\frac{7}{1}$", "$\frac{5}{2}$", "$\frac{4}{2}$"}}
\def\colors{{"cyan", "orange", "olive", "magenta"}}
\def\numberInputs{7}
\def\numberOutputs{3}
\def\operation{mean}
\input{template}
This diff is collapsed.
\def\indices{{0, 0, 1, 0, 2, 2, 3, 3}}
\def\inputs{{"-5", "-1", "-7", "-2", "-3", "-2", "-1", "-3"}}
\def\outputs{{"-5", "-7", "-3", "-3"}}
\def\colors{{"cyan", "orange", "olive", "magenta"}}
\def\numberInputs{7}
\def\numberOutputs{3}
\def\operation{min}
\input{template}
This diff is collapsed.
\def\indices{{0, 0, 1, 0, 2, 2, 3, 3}}
\def\inputs{{5, 1, 7, 2, 3, 2, 1, 3}}
\def\outputs{{10, 7, 6, 3}}
\def\colors{{"cyan", "orange", "olive", "magenta"}}
\def\numberInputs{7}
\def\numberOutputs{3}
\def\operation{mul}
\input{template}
This diff is collapsed.
\def\indices{{0, 0, 0, 1, 2, 2, 3, 3}}
\def\inputs{{5, 1, 2, 7, 3, 2, 1, 3}}
\def\outputs{{8, 7, 5, 4}}
\def\colors{{"cyan", "orange", "olive", "magenta"}}
\def\numberInputs{7}
\def\numberOutputs{3}
\def\operation{add}
\input{template}
This diff is collapsed.
\def\indices{{0, 0, 1, 0, 2, 2, 3, 3}}
\def\inputs{{5, 1, 7, 2, 3, 2, 1, 3}}
\def\outputs{{2.1, 0, 0.7, 1.4}}
\def\colors{{"cyan", "orange", "olive", "magenta"}}
\def\numberInputs{7}
\def\numberOutputs{3}
\def\operation{std}
\input{template}
This diff is collapsed.
\def\indices{{0, 0, 1, 0, 2, 2, 3, 3}}
\def\inputs{{5, 1, 7, 2, 3, 2, 1, 3}}
\def\outputs{{"-8", "-7", "-5", "-4"}}
\def\colors{{"cyan", "orange", "olive", "magenta"}}
\def\numberInputs{7}
\def\numberOutputs{3}
\def\operation{sub}
\input{template}
\documentclass[class=minimal]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\newcommand{\tiny}[1]{\scalebox{0.45}{#1}}
\begin{document}
\begin{tikzpicture}
\tikzstyle{title}=[text width=1.1cm, inner sep=0pt]
\tikzstyle{square}=[rectangle, draw, minimum width=0.5cm, minimum height=0.5cm, inner sep=0pt, fill opacity=0.5, text opacity=1]
\tikzstyle{op}=[ellipse, draw, inner sep=-1pt, minimum height=9pt, minimum width=12pt]
\tikzstyle{edge}=[->]
\tikzstyle{round}=[out=-90, in=90, looseness=0.85]
\node[title] at (-0.8, 2.2) {index};
\node[title] at (-0.8, 1.5) {input};
\foreach \i in {0,...,\numberInputs} {
\pgfmathparse{\indices[\i]}\let\idx\pgfmathresult
\pgfmathparse{\inputs[\i]}\let\in\pgfmathresult
\pgfmathparse{\colors[\idx]}\let\co\pgfmathresult
\node[square] (index\i) at (\i * 0.5, 2.2) {\idx};
\node[square, fill=\co] (input\i) at (\i * 0.5, 1.5) {\in};
\draw[edge] (index\i) -- (input\i);
}
\node[title] at (-0.8, 0.0) {out};
\foreach \i in {0,...,\numberOutputs} {
\pgfmathparse{\outputs[\i]}\let\out\pgfmathresult
\pgfmathparse{\colors[\i]}\let\co\pgfmathresult
\def \x{(\numberInputs - \numberOutputs) * 0.25 + \i * 0.5}
\node[op] (op\i) at ({\x}, 0.6) {\tiny{\operation}};
\node[square, fill=\co] (output\i) at ({\x}, 0.0) {\out};
\draw[edge] (op\i) -- (output\i);
}
\foreach \i in {0,...,\numberInputs} {
\pgfmathparse{\indices[\i]}\let\idx\pgfmathresult
\draw[edge] (input\i) to[round] (op\idx);
}
\end{tikzpicture}
\end{document}
import datetime
import sphinx_rtd_theme
import doctest
import torch_scatter
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.mathjax',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
]
source_suffix = '.rst'
master_doc = 'index'
author = 'Matthias Fey'
project = 'pytorch_scatter'
copyright = '{}, {}'.format(datetime.datetime.now().year, author)
version = torch_scatter.__version__
release = torch_scatter.__version__
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
doctest_default_flags = doctest.NORMALIZE_WHITESPACE
intersphinx_mapping = {'python': ('https://docs.python.org/', None)}
Scatter
=======
.. automodule:: torch_scatter
:noindex:
.. autofunction:: scatter
Segment COO
===========
.. automodule:: torch_scatter
:noindex:
.. autofunction:: segment_coo
Segment CSR
===========
.. automodule:: torch_scatter
:noindex:
.. autofunction:: segment_csr
:github_url: https://github.com/rusty1s/pytorch_scatter
PyTorch Scatter Documentation
=============================
This package consists of a small extension library of highly optimized sparse update (scatter and segment) operations for the use in `PyTorch <http://pytorch.org/>`_, which are missing in the main package.
Scatter and segment operations can be roughly described as reduce operations based on a given "group-index" tensor.
Segment operations require the "group-index" tensor to be sorted, whereas scatter operations are not subject to these requirements.
All included operations are broadcastable, work on varying data types, are implemented both for CPU and GPU with corresponding backward implementations, and are fully traceable.
.. toctree::
:glob:
:maxdepth: 1
:caption: Package reference
functions/*
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
version: 2
build:
image: latest
python:
version: 3.7
system_packages: true
install:
- requirements: docs/requirements.txt
- method: setuptools
path: .
formats: []
...@@ -6,8 +6,3 @@ test = pytest ...@@ -6,8 +6,3 @@ test = pytest
[tool:pytest] [tool:pytest]
addopts = --capture=no --cov addopts = --capture=no --cov
[egg_info]
tag_build =
tag_date = 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment