Skip to content

Commit

Permalink
fix(sphinx-theme): fix sphinx theme version
Browse files Browse the repository at this point in the history
  • Loading branch information
cqchu authored and Wanwan1996 committed Feb 27, 2024
1 parent d2a2d0f commit f1177d5
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: 3.9

- name: Install Python dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.7.17
python-version: 3.9.18

- name: Cache Python packages
id: cache-python
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.7.17
python-version: 3.9.18

- name: Get cached Python packages
id: cache-python
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: 3.9

- name: Install Python dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.7.17
python-version: 3.9.18

- name: Cache Python packages
id: cache-python
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.7.17
python-version: 3.9.18

- name: Get cached Python packages
id: cache-python
Expand Down
6 changes: 2 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Cache key for GitHub Actions: v1.13.2
sphinx==4.3.2
sphinx==5.0.2
sphinx-autobuild
sphinx-intl
sphinxcontrib-mermaid==0.7.1
Expand All @@ -10,12 +10,10 @@ sphinx-tabs
sphinx-togglebutton
sphinx-panels
sphinx-remove-toctrees
pydata-sphinx-theme==0.14.4
jieba
ipython
recommonmark
nbsphinx
beautifulsoup4
breathe

# Third party
third_party/pydata-sphinx-theme
2 changes: 1 addition & 1 deletion source/reference/comparison/adaptive_avg_pool2d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ AdaptiveAvgPool2d 差异对比
--------

输入张量的形状
~~~~~~~~~~~~
~~~~~~~~~~~~~~~
PyTorch 支持 NCHW 或者 CHW 的输入,MegEngine 支持 NCHW 的输入。


Expand Down
9 changes: 5 additions & 4 deletions source/reference/comparison/adaptive_max_pool2d.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. _comparison-adaptive_max_pool2d:

=========================
===========================
AdaptiveMaxPool2d 差异对比
=========================
===========================

.. panels::

Expand Down Expand Up @@ -37,14 +37,15 @@ AdaptiveMaxPool2d 差异对比
--------

输入张量的形状
~~~~~~~~~~~~
~~~~~~~~~~~~~~~

PyTorch 支持 NCHW 或者 CHW 的输入,MegEngine 支持 NCHW 的输入。

参数差异
--------

return_indices 参数
~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~
PyTorch 中包含 ``return_indices`` 参数,MegEngine 无此参数,该参数是一个布尔值,用于指定是否返回输出张量的最大值位置的索引。该参数设置为 True 时,函数会返回一个元组的两部分:输出张量和最大值位置的索引。其中,输出张量是经过自适应最大池化操作后的结果,而最大值位置的索引是一个二维数组,用于表示在每个输出区域内最大值的位置。


Expand Down
4 changes: 2 additions & 2 deletions source/reference/comparison/conv_transpose3d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ padding
~~~~~~~~~~~~
PyTorch padding 可以是单个数字或元组,MegEngine padding 仅支持数值填充 0.

compute_mode 参数
~~~~~~~~~~~~~~~~~
compute_mode 参数
~~~~~~~~~~~~~~~~~~~
MegEngine 中包含 ``compute_mode`` 参数,PyTorch 中无此参数,该参数用于指定计算模式,当设置 “default” 时, 不会对中间结果的精度有特殊要求。当设置 “float32” 时, “float32” 将被用作中间结果的累加器, 但是只有当输入和输出的 dtype 是 float16 时有效。

conv_mode 参数
Expand Down
2 changes: 1 addition & 1 deletion source/reference/comparison/embedding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ sparse
PyTorch ``sparse`` 参数表示是否使用稀疏更新,MegEngine 无此参数。

initial_weight
~~~~~~~~~~~~
~~~~~~~~~~~~~~~~
MegEngine ``initial_weight`` 初始化该模块的可学习权重,形状为(num_embeddings, embedding_dim) ,PyTorch 中无此参数。

.. code-block::: python
Expand Down
3 changes: 2 additions & 1 deletion source/reference/comparison/max_pool2d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Max_Pool2d 差异对比
--------

dilation 参数
~~~~~~~~~~~~
~~~~~~~~~~~~~
Pytorch 中有 ``dilation`` ,MegEngine 中无此参数,该参数用于窗口的元素间隔控制;

return_indices 参数
Expand All @@ -55,6 +55,7 @@ ceil_mode 参数
PyTorch 中有 ceil_mode 参数,MegEngine 无此参数,该参数为 True 时表示在计算输出形状的过程中采用向上取整的操作,为 False 时,采用向下取整。

.. code-block:: python
import megengine
import torch
import numpy as np
Expand Down
1 change: 1 addition & 0 deletions source/user-guide/model-development/data/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.. _data-guide:

.. currentmodule:: megengine

===========================
Expand Down
1 change: 1 addition & 0 deletions source/user-guide/model-development/jit/xla.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ XLA executable 加速训练过程。

模型训练迭代中存在动态执行逻辑的情况下, 无法将整个计算交由 XLA 执行。
这种情况下可以使用 jit.patrial_trace 装饰器对其中静态的部分进行加速。

被 partial_trace 包装部分的前向/反向会使用 XLA 执行, 其他部分仍由 MegEngine 执行。
代码示例如下:

Expand Down

0 comments on commit f1177d5

Please sign in to comment.