220 Star 947 Fork 697

GVPMindSpore/mindscience

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

mindflow.cell.LinearBlock

.. py:class:: mindflow.cell.LinearBlock(in_channels, out_channels, weight_init="normal", bias_init="zeros", has_bias=True, activation=None)

    全连接模块。

    参数:
        - **in_channels** (int) - 输入的通道数。
        - **out_channels** (int) - 输出的通道数。
        - **weight_init** (Union[Tensor, str, Initializer, numbers.Number]) - 可训练权重的初始值。数据类型与输入 `input` 相同。str的值引用函数 `mindspore.common.initializer` 。默认值: ``"normal"``。
        - **bias_init** (Union[Tensor, str, Initializer, numbers.Number]) - 可训练偏差的初始值。数据类型与输入 `input` 相同。str的值引用函数 `mindspore.common.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。
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mindspore/mindscience.git
git@gitee.com:mindspore/mindscience.git
mindspore
mindscience
mindscience
r0.7

搜索帮助