221 Star 941 Fork 692

GVPMindSpore/mindscience

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
mindflow.cell.UNet2D.rst 1.74 KB
一键复制 编辑 原始数据 按行查看 历史
xf233 提交于 2025-04-11 17:08 +08:00 . update flow doc

mindflow.cell.UNet2D

.. py:class:: mindflow.cell.UNet2D(in_channels, out_channels, base_channels, n_layers=4, data_format="NHWC", kernel_size=2, stride=2, activation="relu", enable_bn=True)

    二维UNet模型。
    UNet是一个呈U型的卷积神经网络。它由一个捕捉上下文的编码器和一个实现精确定位的解码器组成。
    具体细节可以参见 `U-Net: Convolutional Networks for Biomedical Image Segmentation <https://arxiv.org/abs/1505.04597>`_ 。

    参数:
        - **in_channels** (int) - 输入的输入特征维度。
        - **out_channels** (int) - 输出的输出特征维度。
        - **base_channels** (int) - UNet的基础维度,以此维度为基础,UNet先成倍增加维度,后成倍减少维度。
        - **n_layers** (int) - 下采样和上采样卷积的层数。默认值: ``4``。
        - **data_format** (str) - 输入数据的数据类型。默认值: ``"NHWC"``。
        - **kernel_size** (int) - 卷积计算的卷积核大小。默认值: ``2``。
        - **stride** (Union[int, tuple[int]]) - 卷积计算的stride大小。整型表示卷积核横向和纵向均移动相同的步长,元组型由两个整数组成,分别表示横向和纵向的卷积核移动步长。默认值: ``2``。
        - **activation** (Union[str, class]) - 激活函数。默认值: ``"relu"``。
        - **enable_bn** (bool) - 指定是否在卷积中使用批量归一化。默认值: ``"True"``。

    输入:
        - **x** (Tensor) - shape为 :math:`(batch\_size, feature\_size, image\_height, image\_width)` 的Tensor。

    输出:
        - **output** (Tensor) - shape为 :math:`(batch\_size, feature\_size, image\_height, image\_width)` 的Tensor。
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mindspore/mindscience.git
git@gitee.com:mindspore/mindscience.git
mindspore
mindscience
mindscience
master

搜索帮助