mindearth.cell.DEMNet
- class mindearth.cell.DEMNet(in_channels=1, out_channels=256, kernel_size=3, scale=5, num_blocks=42)[source]
Digital Elevation Model is based on deep residual network and transfer learning. The details can be found in Super-resolution reconstruction of a 3 arc-second global DEM dataset.
- Parameters
- Inputs:
x (Tensor) - Tensor of shape \((batch\_size, out\_channels, height\_size, width\_size)\).
- Outputs:
Tensor, the output of the DEMNet.
output (Tensor) - Tensor of shape \((batch\_size, out\_channels, new\_height\_size, new_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 import DEMNet >>> input_images = np.random.rand(64, 1, 32, 32).astype(np.float32) >>> net = DEMNet(in_channels=1, out_channels=256, kernel_size=3, scale=5, num_blocks=42) >>> out = net(Tensor(input_images, ms.float32)) >>> print(out.shape) (64, 1, 160, 160)