File size: 581 Bytes
6f3c6ef
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""Compact trainable model used by the local Spherical DYffusion pipeline."""

from torch import nn


class SphericalDYffusion(nn.Module):
    """Small convolutional forecaster preserving the global-grid tensor contract."""

    def __init__(self, channels: int):
        super().__init__()
        self.net = nn.Sequential(
            nn.Conv2d(channels, 32, 3, padding=1),
            nn.GELU(),
            nn.Conv2d(32, 32, 3, padding=1),
            nn.GELU(),
            nn.Conv2d(32, channels, 1),
        )

    def forward(self, inputs):
        return self.net(inputs)