Struct std::RocmUNet
struct RocmUNet {
struct RocmConv2D encConv1;
struct RocmConv2D encConv2;
struct RocmConv2D bottleneck;
struct RocmConv2D decConv1;
struct RocmConv2D decConv2;
struct RocmBuf e1;
struct RocmBuf p1;
struct RocmBuf e2;
struct RocmBuf p2;
struct RocmBuf mid;
struct RocmBuf cat1;
struct RocmBuf d1;
struct RocmBuf cat2;
unsigned long batch;
unsigned long height;
unsigned long width;
int ok;
}Weights plus every intermediate activation, sized once for a fixed batch x height x width, so a forward pass allocates nothing. Each decoder step upsamples straight into its concat buffer (rocm_upsample2x_concat).
Fields
[B, c1, H, W]
[B, c1, H/2, W/2]
[B, c2, H/2, W/2]
[B, c2, H/4, W/4]
[B, c2, H/4, W/4]
[B, 2*c2, H/2, W/2]
[B, c1, H/2, W/2]
[B, 2*c1, H, W]
0 if an upload or allocation failed
Methods
y: [batch, outChannels, height, width]. Queued, like the ops above.
§
static struct RocmUNet new(
const &UNet net,
unsigned long batch,
unsigned long height,
unsigned long width,
)source · definitionheight and width must each be divisible by 4.