create_unet_model: Create_unet_model

Description Usage Arguments Value

View source: R/unet.R

Description

Create custom unet architecture

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
create_unet_model(
  arch,
  n_out,
  img_size,
  pretrained = TRUE,
  cut = NULL,
  n_in = 3,
  blur = FALSE,
  blur_final = TRUE,
  self_attention = FALSE,
  y_range = NULL,
  last_cross = TRUE,
  bottle = FALSE,
  act_cls = nn()$ReLU,
  init = nn()$init$kaiming_normal_,
  norm_type = NULL
)

Arguments

arch

architecture

n_out

number of out features

img_size

imgage shape

pretrained

pretrained or not

cut

cut

n_in

number of input

blur

blur is used to avoid checkerboard artifacts at each layer.

blur_final

blur final is specific to the last layer.

self_attention

self_attention determines if we use a self attention layer at the third block before the end.

y_range

If y_range is passed, the last activations go through a sigmoid rescaled to that range.

last_cross

last_cross

bottle

bottle

act_cls

activation

init

initialzier

norm_type

normalization type

Value

None


fastai documentation built on July 28, 2021, 5:06 p.m.