Skip to content

Commit 83276d0

Browse files
Update style of documentation, hypergraph page and reference
1 parent e0b4b8f commit 83276d0

295 files changed

Lines changed: 138142 additions & 22442 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: eca55591059baa81de1dcedde81efff1
3+
config: 7192bb01cb11925cfee048363011ddbc
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

docs/.nojekyll

Whitespace-only changes.

docs/_modules/easygraph/datasets/hypergraph/mathoverflow_answers.html

Lines changed: 227 additions & 0 deletions
Large diffs are not rendered by default.

docs/_modules/easygraph/datasets/hypergraph/senate_committees.html

Lines changed: 220 additions & 0 deletions
Large diffs are not rendered by default.

docs/_modules/easygraph/experiments/base.html

Lines changed: 325 additions & 0 deletions
Large diffs are not rendered by default.

docs/_modules/easygraph/experiments/hypergraphs/hypergraph.html

Lines changed: 242 additions & 0 deletions
Large diffs are not rendered by default.

docs/_modules/easygraph/experiments/vertex_classification.html

Lines changed: 287 additions & 0 deletions
Large diffs are not rendered by default.

docs/_modules/easygraph/model/hypergraphs/dhcf.html

Lines changed: 209 additions & 0 deletions
Large diffs are not rendered by default.

docs/_modules/easygraph/model/hypergraphs/dhne.html

Lines changed: 191 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
<!DOCTYPE html>
2+
<html class="writer-html5" lang="en" >
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>easygraph.model.hypergraphs.hgnn &mdash; EasyGraph 1.4.1</title>
7+
<link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
8+
<link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
9+
<link rel="stylesheet" href="../../../../_static/my_theme.css" type="text/css" />
10+
<!--[if lt IE 9]>
11+
<script src="../../../../_static/js/html5shiv.min.js"></script>
12+
<![endif]-->
13+
14+
<script src="../../../../_static/jquery.js"></script>
15+
<script src="../../../../_static/_sphinx_javascript_frameworks_compat.js"></script>
16+
<script data-url_root="../../../../" id="documentation_options" src="../../../../_static/documentation_options.js"></script>
17+
<script src="../../../../_static/doctools.js"></script>
18+
<script src="../../../../_static/sphinx_highlight.js"></script>
19+
<script src="../../../../_static/copybutton.js"></script>
20+
<script src="../../../../_static/js/theme.js"></script>
21+
<link rel="index" title="Index" href="../../../../genindex.html" />
22+
<link rel="search" title="Search" href="../../../../search.html" />
23+
</head>
24+
25+
<body class="wy-body-for-nav">
26+
<div class="wy-grid-for-nav">
27+
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
28+
<div class="wy-side-scroll">
29+
<div class="wy-side-nav-search" style="background: white" >
30+
31+
32+
33+
<a href="../../../../index.html" class="icon icon-home">
34+
EasyGraph
35+
<img src="../../../../_static/logo.png" class="logo" alt="Logo"/>
36+
</a>
37+
<div role="search">
38+
<form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
39+
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
40+
<input type="hidden" name="check_keywords" value="yes" />
41+
<input type="hidden" name="area" value="default" />
42+
</form>
43+
</div>
44+
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
45+
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
46+
<ul>
47+
<li class="toctree-l1"><a class="reference internal" href="../../../../install.html">Installation</a></li>
48+
<li class="toctree-l1"><a class="reference internal" href="../../../../example.html">Examples of Graph Analysis</a></li>
49+
<li class="toctree-l1"><a class="reference internal" href="../../../../hypergraph.html">EasyHypergraph</a></li>
50+
<li class="toctree-l1"><a class="reference internal" href="../../../../eggpu.html">EGGPU</a></li>
51+
<li class="toctree-l1"><a class="reference internal" href="../../../../reference.html">Reference</a></li>
52+
<li class="toctree-l1"><a class="reference internal" href="../../../../tutorial.html">Tutorial</a></li>
53+
<li class="toctree-l1"><a class="reference internal" href="../../../../contributorGuide.html">Contributor Guide</a></li>
54+
<li class="toctree-l1"><a class="reference internal" href="../../../../license.html">License</a></li>
55+
<li class="toctree-l1"><a class="reference internal" href="../../../../sourcecode.html">Source Code</a></li>
56+
<li class="toctree-l1"><a class="reference internal" href="../../../../honors.html">Honors</a></li>
57+
<li class="toctree-l1"><a class="reference internal" href="../../../../dev.html">Developer Documentation</a></li>
58+
</ul>
59+
60+
</div>
61+
</div>
62+
</nav>
63+
64+
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" style="background: white" >
65+
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
66+
<a href="../../../../index.html">EasyGraph</a>
67+
</nav>
68+
69+
<div class="wy-nav-content">
70+
<div class="rst-content">
71+
<div role="navigation" aria-label="Page navigation">
72+
<ul class="wy-breadcrumbs">
73+
<li><a href="../../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
74+
<li class="breadcrumb-item"><a href="../../../index.html">Module code</a></li>
75+
<li class="breadcrumb-item active">easygraph.model.hypergraphs.hgnn</li>
76+
<li class="wy-breadcrumbs-aside">
77+
</li>
78+
</ul>
79+
<hr/>
80+
</div>
81+
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
82+
<div itemprop="articleBody">
83+
84+
<h1>Source code for easygraph.model.hypergraphs.hgnn</h1><div class="highlight"><pre>
85+
<span></span><span class="kn">import</span> <span class="nn">torch</span>
86+
<span class="kn">import</span> <span class="nn">torch.nn</span> <span class="k">as</span> <span class="nn">nn</span>
87+
88+
<span class="kn">from</span> <span class="nn">easygraph.nn</span> <span class="kn">import</span> <span class="n">HGNNConv</span>
89+
90+
91+
<div class="viewcode-block" id="HGNN"><a class="viewcode-back" href="../../../../reference/easygraph.model.hypergraphs.hgnn.html#easygraph.model.hypergraphs.hgnn.HGNN">[docs]</a><span class="k">class</span> <span class="nc">HGNN</span><span class="p">(</span><span class="n">nn</span><span class="o">.</span><span class="n">Module</span><span class="p">):</span>
92+
<span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;The HGNN model proposed in `Hypergraph Neural Networks &lt;https://arxiv.org/pdf/1809.09401&gt;`_ paper (AAAI 2019).</span>
93+
94+
<span class="sd"> Args:</span>
95+
<span class="sd"> ``in_channels`` (``int``): :math:`C_{in}` is the number of input channels.</span>
96+
<span class="sd"> ``hid_channels`` (``int``): :math:`C_{hid}` is the number of hidden channels.</span>
97+
<span class="sd"> ``num_classes`` (``int``): The Number of class of the classification task.</span>
98+
<span class="sd"> ``use_bn`` (``bool``): If set to ``True``, use batch normalization. Defaults to ``False``.</span>
99+
<span class="sd"> ``drop_rate`` (``float``, optional): Dropout ratio. Defaults to 0.5.</span>
100+
<span class="sd"> &quot;&quot;&quot;</span>
101+
102+
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span>
103+
<span class="bp">self</span><span class="p">,</span>
104+
<span class="n">in_channels</span><span class="p">:</span> <span class="nb">int</span><span class="p">,</span>
105+
<span class="n">hid_channels</span><span class="p">:</span> <span class="nb">int</span><span class="p">,</span>
106+
<span class="n">num_classes</span><span class="p">:</span> <span class="nb">int</span><span class="p">,</span>
107+
<span class="n">use_bn</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">,</span>
108+
<span class="n">drop_rate</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="mf">0.5</span><span class="p">,</span>
109+
<span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
110+
<span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">()</span>
111+
<span class="bp">self</span><span class="o">.</span><span class="n">layers</span> <span class="o">=</span> <span class="n">nn</span><span class="o">.</span><span class="n">ModuleList</span><span class="p">()</span>
112+
<span class="bp">self</span><span class="o">.</span><span class="n">layers</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
113+
<span class="n">HGNNConv</span><span class="p">(</span><span class="n">in_channels</span><span class="p">,</span> <span class="n">hid_channels</span><span class="p">,</span> <span class="n">use_bn</span><span class="o">=</span><span class="n">use_bn</span><span class="p">,</span> <span class="n">drop_rate</span><span class="o">=</span><span class="n">drop_rate</span><span class="p">)</span>
114+
<span class="p">)</span>
115+
<span class="bp">self</span><span class="o">.</span><span class="n">layers</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
116+
<span class="n">HGNNConv</span><span class="p">(</span><span class="n">hid_channels</span><span class="p">,</span> <span class="n">num_classes</span><span class="p">,</span> <span class="n">use_bn</span><span class="o">=</span><span class="n">use_bn</span><span class="p">,</span> <span class="n">is_last</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
117+
<span class="p">)</span>
118+
119+
<div class="viewcode-block" id="HGNN.forward"><a class="viewcode-back" href="../../../../reference/easygraph.model.hypergraphs.hgnn.html#easygraph.model.hypergraphs.hgnn.HGNN.forward">[docs]</a> <span class="k">def</span> <span class="nf">forward</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">X</span><span class="p">:</span> <span class="n">torch</span><span class="o">.</span><span class="n">Tensor</span><span class="p">,</span> <span class="n">hg</span><span class="p">:</span> <span class="s2">&quot;Hypergraph&quot;</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">torch</span><span class="o">.</span><span class="n">Tensor</span><span class="p">:</span>
120+
<span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;The forward function.</span>
121+
122+
<span class="sd"> Args:</span>
123+
<span class="sd"> ``X`` (``torch.Tensor``): Input vertex feature matrix. Size :math:`(N, C_{in})`.</span>
124+
<span class="sd"> ``hg`` (``eg.Hypergraph``): The hypergraph structure that contains :math:`N` vertices.</span>
125+
<span class="sd"> &quot;&quot;&quot;</span>
126+
<span class="k">for</span> <span class="n">layer</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">layers</span><span class="p">:</span>
127+
<span class="n">X</span> <span class="o">=</span> <span class="n">layer</span><span class="p">(</span><span class="n">X</span><span class="p">,</span> <span class="n">hg</span><span class="p">)</span>
128+
<span class="k">return</span> <span class="n">X</span></div></div>
129+
</pre></div>
130+
131+
</div>
132+
</div>
133+
<footer>
134+
135+
<hr/>
136+
137+
<div role="contentinfo">
138+
<p>&#169; Copyright 2020-2025, DataNET Group, Fudan University.</p>
139+
</div>
140+
141+
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
142+
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
143+
provided by <a href="https://readthedocs.org">Read the Docs</a>.
144+
145+
146+
</footer>
147+
</div>
148+
</div>
149+
</section>
150+
</div>
151+
<script>
152+
jQuery(function () {
153+
SphinxRtdTheme.Navigation.enable(true);
154+
});
155+
</script>
156+
157+
</body>
158+
</html>

0 commit comments

Comments
 (0)