208 Star 855 Fork 628

GVPMindSpore / mindscience

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
mindelec.architecture.ResBlock.rst 1.37 KB
一键复制 编辑 原始数据 按行查看 历史
luojianing 提交于 2023-04-14 17:28 . add ` for values in docs

mindelec.architecture.ResBlock

.. py:class:: mindelec.architecture.ResBlock(in_channels, out_channels, weight_init='normal', bias_init='zeros', has_bias=True, activation=None)

    密集层的ResBlock。

    参数:
        - **in_channels** (int) - 输入空间中的通道数。
        - **out_channels** (int) - 输出空间中的通道数。
        - **weight_init** (Union[Tensor, str, Initializer, numbers.Number]) - 可训练的weight_init参数。dtype与输入 `input` 相同。str的值可参考函数 `initializer`。默认值: ``“normal”``。
        - **bias_init** (Union[Tensor, str, Initializer, numbers.Number]) - 可训练的bias_init参数。dtype为与输入 `input` 相同。str的值可参考函数 `initializer`。默认值: ``“zeros”``。
        - **has_bias** (bool) - 指定图层是否使用偏置矢量。默认值: ``True``。
        - **activation** (Union[str, Cell, Primitive, None]) - 应用于密集层输出的激活函数。默认值: ``None``。

    输入:
        - **input** (Tensor) - shape为 :math:`(*, in\_channels)` 的Tensor。

    输出:
        shape为 :math:`(*, out\_channels)` 的Tensor。

    异常:
        - **ValueError** - 如果 `in_channels` 不等于 `out_channels`。
        - **TypeError** - 如果 `activation` 的值不是 `[str, Cell, Primitive]` 其中之一。
1
https://gitee.com/mindspore/mindscience.git
git@gitee.com:mindspore/mindscience.git
mindspore
mindscience
mindscience
master

搜索帮助