name
|
A name for the model, used in the score table and in file names.
|
input_shape
|
The size every image is read at, c(height, width). Unlike a segmentation model nothing has to divide by 2^blocks - there is no decoder to line up with - but every side must still be at least 2^blocks, or the deepest level has nothing left to pool.
|
channels
|
Input channels: 3 for colour, 1 for greyscale.
|
blocks
|
How many times the resolution is halved before the features are pooled, so how much context the answer is made from. Ignored, and refused, when encoder names a backbone - the backbone’s own depth is then the only one there is.
|
filters
|
Filters in the first block, doubled at every level, so this and blocks set how wide the pooled feature vector is: filters * 2^blocks. Ignored, and refused, with encoder.
|
block_width
|
Convolutions per block, at every level. Raising it adds depth without adding levels, which is the lever to reach for when the objects are small enough that halving the resolution again would lose them - a crop of one cell is exactly that case. Ignored, and refused, with encoder.
|
pooling
|
How the feature map becomes one vector per image. “avg” averages evidence over the whole frame, which is what every classification head since the networks that replaced the flattened dense layer does; “max” takes the strongest response anywhere, which is the one to reach for when the thing being looked for is small and somewhere in the picture rather than the picture itself.
|
head_dropout
|
Drop this fraction of the pooled vector before the dense layer. Separate from dropout, which sits between convolutions and reaches nothing at all when the contracting path is a pretrained backbone with its own regularisation - this is then the only one left.
|
dropout, batch_normalization, separable_conv, spatial_dropout
|
Regularisation and shape of the contracting path, as in u_net().
|
activation, initialiser
|
The non-linearity between convolutions, and how the weights start.
|
loss
|
The objective. Fewer are admissible here than anywhere else in this package, and the two that are - loss_cce() and loss_focal() - are the ones that score each answer on its own rather than scoring an overlap. available_losses(“classification”) lists them and the engine’s refusal names them.
|
metrics
|
What to report beside the loss. metric_auc() is the engine’s default and that is a measurement rather than a preference: at a 3% prevalence a calibrated model never crosses the threshold, so accuracy, balanced accuracy and F1 all report a real signal and a collapse as the same number. See metric_auc().
|
optimizer, callbacks, augmentation, epochs, batch_size, weights, fit
|
As in u_net(). A callback watching val_<metric> is refused when nothing in metrics will produce it, and there is no foreground to watch - a classification epoch has no background class and reports no such share.
|
encoder
|
A pretrained backbone instead of our own contracting path, by name - see encoders for the table and what it is actually good for. With this, blocks, filters and block_width are refused.
|
pretrained, freeze_encoder, encoder_learning_rate
|
How the backbone arrives and how it is trained, as in u_net().
|
normalise
|
Normalise the input with the backbone’s own ImageNet statistics, defaulting to pretrained. Set it TRUE with pretrained = FALSE to reload weights you exported from a pretrained encoder without a network: the statistics come from the backbone’s configuration rather than from its weights. See u_net for the whole of it; it is recorded in the weights’ fingerprint either way, and setting it TRUE needs encoder, because the statistics belong to a backbone.
|