delta.model.unet#
- delta.model.unet(input_size=(None, None, 1), final_activation='linear', output_classes=1, dropout=0, levels=5, filters=None)[source]#
Create a U-Net.
- Parameters
- input_sizetuple of 3 ints, optional
Dimensions of the input tensor, excluding batch size. The default is (None, None, 1), which means that any image size is accepted.
- final_activationstring or function, optional
Activation function for the final 2D convolutional layer. see keras.activations The default is “linear” (no activation: outputs logits).
- output_classesint, optional
Number of output classes, ie dimensionality of the output space of the last 2D convolutional layer. The default is 1.
- dropoutfloat, optional
Dropout layer rate in the contracting & expanding blocks. Valid range is [0,1). If 0, no dropout layer is added. The default is 0.
- levelsint, optional
Number of levels of the U-Net, ie number of successive contraction then expansion blocks are combined together. Ignored if filters is specified. The default is 5.
- filters[int], optional
Number of convolutional kernels at each level. The default is starting with 64 and multiplying by 2 at each level.
- Returns
- modelModel
Defined U-Net model (not compiled yet).