Document feedback

Question document fragment

When a question document fragment contains a formula, it is displayed as a space.

Submission type
issue

It's a little complicated...

I'd like to ask someone.

Please select the submission type

Problem type
Specifications and Common Mistakes

- Specifications and Common Mistakes:

- Misspellings or punctuation mistakes,incorrect formulas, abnormal display.

- Incorrect links, empty cells, or wrong formats.

- Chinese characters in English context.

- Minor inconsistencies between the UI and descriptions.

- Low writing fluency that does not affect understanding.

- Incorrect version numbers, including software package names and version numbers on the UI.

Usability

- Usability:

- Incorrect or missing key steps.

- Missing main function descriptions, keyword explanation, necessary prerequisites, or precautions.

- Ambiguous descriptions, unclear reference, or contradictory context.

- Unclear logic, such as missing classifications, items, and steps.

Correctness

- Correctness:

- Technical principles, function descriptions, supported platforms, parameter types, or exceptions inconsistent with that of software implementation.

- Incorrect schematic or architecture diagrams.

- Incorrect commands or command parameters.

- Incorrect code.

- Commands inconsistent with the functions.

- Wrong screenshots.

- Sample code running error, or running results inconsistent with the expectation.

Risk Warnings

- Risk Warnings:

- Lack of risk warnings for operations that may damage the system or important data.

Content Compliance

- Content Compliance:

- Contents that may violate applicable laws and regulations or geo-cultural context-sensitive words and expressions.

- Copyright infringement.

Please select the type of question

Problem description

Describe the bug so that we can quickly locate the problem.

mindflow.cell.PDENet

class mindflow.cell.PDENet(height, width, channels, kernel_size, max_order, dx=0.01, dy=0.01, dt=0.01, periodic=True, enable_moment=True, if_fronzen=False)[source]

The PDE-Net model.

PDE-Net is a feed-forward deep network to fulfill two objectives at the same time: to accurately predict dynamics of complex systems and to uncover the underlying hidden PDE models. The basic idea is to learn differential operators by learning convolution kernels (filters), and apply neural networks or other machine learning methods to approximate the unknown nonlinear responses. A special feature of the proposed PDE-Net is that all filters are properly constrained, which enables us to easily identify the governing PDE models while still maintaining the expressive and predictive power of the network. These constrains are carefully designed by fully exploiting the relation between the orders of differential operators and the orders of sum rules of filters (an important concept originated from wavelet theory).

For more details, please refers to the paper PDE-Net: Learning PDEs from Data.

Parameters
  • height (int) – The height number of the input and output tensor of the PDE-Net.

  • width (int) – The width number of the input and output tensor of the PDE-Net.

  • channels (int) – The channel number of the input and output tensor of the PDE-Net.

  • kernel_size (int) – Specifies the height and width of the 2D convolution kernel.

  • max_order (int) – The max order of the PDE models.

  • dx (float) – The spatial resolution of x dimension. Default: 0.01.

  • dy (float) – The spatial resolution of y dimension. Default: 0.01.

  • dt (float) – The time step of the PDE-Net. Default: 0.01.

  • periodic (bool) – Specifies whether periodic pad is used with convolution kernels. Default: True.

  • enable_moment (bool) – Specifies whether the convolution kernels are constrained by moments. Default: True.

  • if_fronzen (bool) – Specifies whether the moment is frozen. Default: False.

Inputs:
  • input (Tensor) - Tensor of shape (batch_size,channels,height,width).

Outputs:

Tensor, has the same shape as input with data type of float32.

Raises
  • TypeError – If height, width, channels, kernel_size or max_order is not an int.

  • TypeError – If periodic, enable_moment, if_fronzen is not a bool.

Supported Platforms:

Ascend GPU

Examples

>>> import numpy as np
>>> from mindspore import Tensor
>>> import mindspore.common.dtype as mstype
>>> from mindflow.cell.neural_operators import PDENet
>>> input = Tensor(np.random.rand(1, 2, 16, 16), mstype.float32)
>>> net = PDENet(16, 16, 2, 5, 3, 2)
>>> output = net(input)
>>> print(output.shape)
(1, 2, 16, 16)