Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MegEngine 天元
MegEngine
提交
2c4d1afe
MegEngine
项目概览
MegEngine 天元
/
MegEngine
1 年多 前同步成功
通知
404
Star
4705
Fork
582
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MegEngine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
2c4d1afe
编写于
4月 03, 2020
作者:
M
Megvii Engine Team
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test(mge): move `NUMBER` config to pytest.init
GitOrigin-RevId: 1d82209c409ccf884ed9f7917a51ea4da62ec00b
上级
f33a92d6
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
4 addition
and
11 deletion
+4
-11
python_module/megengine/functional/math.py
python_module/megengine/functional/math.py
+0
-1
python_module/megengine/functional/nn.py
python_module/megengine/functional/nn.py
+0
-1
python_module/megengine/functional/sort.py
python_module/megengine/functional/sort.py
+0
-2
python_module/megengine/functional/utils.py
python_module/megengine/functional/utils.py
+0
-1
python_module/megengine/module/activation.py
python_module/megengine/module/activation.py
+3
-4
python_module/megengine/module/embedding.py
python_module/megengine/module/embedding.py
+1
-2
未找到文件。
python_module/megengine/functional/math.py
浏览文件 @
2c4d1afe
...
@@ -190,7 +190,6 @@ def sqrt(inp: Tensor) -> Tensor:
...
@@ -190,7 +190,6 @@ def sqrt(inp: Tensor) -> Tensor:
Outputs:
Outputs:
.. testoutput::
.. testoutput::
:options: +NUMBER
[[0. 1. 1.4142]
[[0. 1. 1.4142]
[1.7321 2. 2.2361 ]]
[1.7321 2. 2.2361 ]]
...
...
python_module/megengine/functional/nn.py
浏览文件 @
2c4d1afe
...
@@ -636,7 +636,6 @@ def interpolate(
...
@@ -636,7 +636,6 @@ def interpolate(
Outputs:
Outputs:
.. testoutput::
.. testoutput::
:options: +NUMBER
[[[[1. 1.25 1.75 2. ]
[[[[1. 1.25 1.75 2. ]
[1.5 1.75 2.25 2.5 ]
[1.5 1.75 2.25 2.5 ]
...
...
python_module/megengine/functional/sort.py
浏览文件 @
2c4d1afe
...
@@ -39,7 +39,6 @@ def argsort(inp: Tensor, descending: bool = False) -> Tuple[Tensor, Tensor]:
...
@@ -39,7 +39,6 @@ def argsort(inp: Tensor, descending: bool = False) -> Tuple[Tensor, Tensor]:
Outputs:
Outputs:
.. testoutput::
.. testoutput::
:options: +NUMBER
[1. 2.] [0 1]
[1. 2.] [0 1]
...
@@ -93,7 +92,6 @@ def top_k(
...
@@ -93,7 +92,6 @@ def top_k(
Outputs:
Outputs:
.. testoutput::
.. testoutput::
:options: +NUMBER
[1. 2. 3. 4. 5.] [7 0 6 1 5]
[1. 2. 3. 4. 5.] [7 0 6 1 5]
...
...
python_module/megengine/functional/utils.py
浏览文件 @
2c4d1afe
...
@@ -50,7 +50,6 @@ def accuracy(logits: Tensor, target: Tensor, topk: Union[int, Iterable[int]] = 1
...
@@ -50,7 +50,6 @@ def accuracy(logits: Tensor, target: Tensor, topk: Union[int, Iterable[int]] = 1
Outputs:
Outputs:
.. testoutput::
.. testoutput::
:options: +NUMBER
[0.] [0.375]
[0.] [0.375]
"""
"""
...
...
python_module/megengine/module/activation.py
浏览文件 @
2c4d1afe
...
@@ -20,7 +20,7 @@ class Softmax(Module):
...
@@ -20,7 +20,7 @@ class Softmax(Module):
.. math::
.. math::
\text{Softmax}(x_{i}) = \frac{exp(x_i)}{\sum_j exp(x_j)}
\text{Softmax}(x_{i}) = \frac{exp(x_i)}{\sum_j exp(x_j)}
It is applied to an n-dimensional input Tensor and rescaling them so that the elements of the
It is applied to an n-dimensional input Tensor and rescaling them so that the elements of the
n-dimensional output Tensor lie in the range of `[0, 1]` and sum to 1.
n-dimensional output Tensor lie in the range of `[0, 1]` and sum to 1.
:param axis: An axis along which softmax will be applied. By default,
:param axis: An axis along which softmax will be applied. By default,
...
@@ -137,8 +137,8 @@ class PReLU(Module):
...
@@ -137,8 +137,8 @@ class PReLU(Module):
ax, & \text{ otherwise }
ax, & \text{ otherwise }
\end{cases}
\end{cases}
Here :math:`a` is a learnable parameter. When called without arguments, `PReLU()` uses
Here :math:`a` is a learnable parameter. When called without arguments, `PReLU()` uses
a single paramter :math:`a` across all input channel. If called with `PReLU(num_of_channels)`,
a single paramter :math:`a` across all input channel. If called with `PReLU(num_of_channels)`,
a seperate :math:`a` is used for each input channle.
a seperate :math:`a` is used for each input channle.
:param num_parameters: number of :math:`a` to learn, there is only two
:param num_parameters: number of :math:`a` to learn, there is only two
...
@@ -218,7 +218,6 @@ class LeakyReLU(Module):
...
@@ -218,7 +218,6 @@ class LeakyReLU(Module):
Outputs:
Outputs:
.. testoutput::
.. testoutput::
:options: +NUMBER
[-0.08 -0.12 6. 10. ]
[-0.08 -0.12 6. 10. ]
...
...
python_module/megengine/module/embedding.py
浏览文件 @
2c4d1afe
...
@@ -21,7 +21,7 @@ class Embedding(Module):
...
@@ -21,7 +21,7 @@ class Embedding(Module):
A simple lookup table that stores embeddings of a fixed dictionary and size.
A simple lookup table that stores embeddings of a fixed dictionary and size.
This module is often used to store word embeddings and retrieve them using indices.
This module is often used to store word embeddings and retrieve them using indices.
The input to the module is a list of indices, and the output is the corresponding word embeddings.
The input to the module is a list of indices, and the output is the corresponding word embeddings.
The indices should less than num_embeddings.
The indices should less than num_embeddings.
:param num_embeddings: size of embedding dictionary.
:param num_embeddings: size of embedding dictionary.
...
@@ -138,7 +138,6 @@ class Embedding(Module):
...
@@ -138,7 +138,6 @@ class Embedding(Module):
Outputs:
Outputs:
.. testoutput::
.. testoutput::
:options: +NUMBER
[[[1.2 2.3 3.4 4.5 5.6]
[[[1.2 2.3 3.4 4.5 5.6]
[0.1 1.1 2.1 3.1 4.1]
[0.1 1.1 2.1 3.1 4.1]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录