struct UNet {
struct Conv2D encConv1;
struct Conv2D encConv2;
struct Conv2D bottleneck;
struct Conv2D decConv1;
struct Conv2D decConv2;
}Fields
inChannels -> c1
c1 -> c2
c2 -> c2
(c2 + c2 skip) -> c1
(c1 + c1 skip) -> outChannels
Methods
Input height/width must each be divisible by 4 (two 2x poolings). 'net' isn't semantically mutated, but is taken by mutable reference since its Conv2D sub-layers are threaded through by address internally.
= drop()
§
static struct UNet new(
unsigned long inChannels,
unsigned long c1,
unsigned long c2,
unsigned long outChannels,
)source · definition