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.

PR

Just a small problem.

I can fix it online!

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.

mindearth.cell.DgmrGenerator

View Source On Gitee
class mindearth.cell.DgmrGenerator(forecast_steps=18, in_channels=1, out_channels=256, conv_type='standard', latent_channels=768, context_channels=384, generation_steps=1)[source]

The Dgmr Generator is based on Conditional_Stack, Latent_Stack, Upsample_Stack and ConvGRU, which contain deep residual block. The details can be found in Skilful precipitation nowcasting using deep generative models of radar.

Parameters
  • forecast_steps (int) – The steps of forecast frames.

  • in_channels (int) – The channels of input frame.

  • out_channels (int) – Shape of the output predictions, generally should be same as the input shape.

  • conv_type (str) – The convolution type.

  • latent_channels (int) – Latent channels according to network.

  • context_channels (int) – Context channels according to network.

  • generation_steps (int) – Number of generation steps to use in forward pass, in paper is 6 and the best is chosen for the loss, this results in huge amounts of GPU memory though, so less might work better for training.

Inputs:
  • x (Tensor) - Tensor of shape (batch_size,input_frames,out_channels,height_size,width_size).

Outputs:

Tensor, the output of Dgmr Generator.

  • output (Tensor) - Tensor of shape (batch_size,output_frames,out_channels,height_size,width_size).

Supported Platforms:

Ascend GPU

Examples

>>> import numpy as np
>>> import mindspore as ms
>>> from mindspore import ops, Tensor
>>> from mindspore.nn import Cell
>>> from mindearth.cell.dgmr.dgmrnet import DgmrGenerator
>>> input_frames = np.random.rand(1, 4, 1, 256, 256).astype(np.float32)
>>> net = DgmrGenerator(
>>>         forecast_steps = 18,
>>>         in_channels = 1,
>>>         out_channels = 256,
>>>         conv_type = "standard",
>>>         latent_channels = 768,
>>>         context_channels = 384,
>>>         generation_steps = 1
>>>     )
>>> out = net(Tensor(input_frames, ms.float32))
>>> print(out.shape)
(1, 18, 1, 256, 256)