210 Star 863 Fork 640

GVPMindSpore/mindscience

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

mindflow.pde.FlowWithLoss

.. py:class:: mindflow.pde.FlowWithLoss(model, loss_fn='mse')

    基于数据驱动的流体问题求解的基类。

    参数:
        - **model** (mindspore.nn.Cell) - 用于训练或测试的网络模型。
        - **loss_fn** (Union[str, Cell]) - 损失函数。默认值: ``'mse'``。

    异常:
        - **TypeError** - 如果 `mode` 或 `loss_fn` 的类型不是mindspore.nn.Cell。
        - **NotImplementedError** - 如果成员函数 `get_loss` 未定义。

    .. py:method:: get_loss(inputs, labels)

        计算训练或测试模型的损失。

        参数:
            - **inputs** (Tensor) - 网络模型的输入数据。
            - **labels** (Tensor) - 样本的真值。
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mindspore/mindscience.git
git@gitee.com:mindspore/mindscience.git
mindspore
mindscience
mindscience
master

搜索帮助

Cb406eda 1850385 E526c682 1850385