220 Star 947 Fork 698

GVPMindSpore/mindscience

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
mindearth.cell.AFNONet.rst 1.73 KB
一键复制 编辑 原始数据 按行查看 历史
Bokai Li 提交于 2023-09-26 17:41 +08:00 . [MindEarth]修改文档

mindearth.cell.AFNONet

.. py:class:: mindearth.cell.AFNONet(image_size=(128, 256), in_channels=1,  out_channels=1, patch_size=8, encoder_depths=12, encoder_embed_dim=768, mlp_ratio=4, dropout_rate=1.0, compute_dtype=mindspore.float32)

    AFNO是一个基于傅立叶神经算子(FNO)并结合Vision Transformer结构的深度学习模型。
    有关更多详细信息,请参考论文 `Adaptive Fourier Neural Operators: Efficient Token Mixers For Transformers <https://arxiv.org/pdf/2111.13587.pdf>`_ 。

    参数:
        - **image_size** (tuple[int]) - 输入图像的尺寸。默认值: (128, 256)。
        - **in_channels** (int) - 输入中的通道数。默认值: ``1``。
        - **out_channels** (int) - 输出中的通道数。默认值: ``1``。
        - **patch_size** (int) - 图像的path尺寸。默认值: ``8``。
        - **encoder_depths** (int) - encoder层的层数。默认值: ``12``。
        - **encoder_embed_dim** (int) - encoder层的编码器维度。默认值: ``768``。
        - **mlp_ratio** (int) - 解码器层的通道数提升比率。默认值: ``4``。
        - **dropout_rate** (float) - dropout层的速率。默认值: ``1.0``。
        - **compute_dtype** (dtype) - encoder层、decoding_embedding层、decoder层和dense层的数据类型。默认值: ``mstype.float32``。

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

    输出:
        Tensor,AFNO网络的输出。

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

搜索帮助