GANLearner_wgan {fastai}R Documentation

Wgan

Description

Create a WGAN from 'data', 'generator' and 'critic'.

Usage

GANLearner_wgan(
  dls,
  generator,
  critic,
  switcher = NULL,
  clip = 0.01,
  switch_eval = FALSE,
  gen_first = FALSE,
  show_img = TRUE,
  cbs = NULL,
  metrics = NULL,
  opt_func = Adam(),
  lr = 0.001,
  splitter = trainable_params,
  path = NULL,
  model_dir = "models",
  wd = NULL,
  wd_bn_bias = FALSE,
  train_bn = TRUE,
  moms = list(0.95, 0.85, 0.95)
)

Arguments

dls

dataloader

generator

generator

critic

critic

switcher

switcher

clip

clip value

switch_eval

switch evaluation

gen_first

generator first

show_img

show image or not

cbs

callbacks

metrics

metrics

opt_func

optimization function

lr

learning rate

splitter

splitter

path

path

model_dir

model directory

wd

weight decay

wd_bn_bias

weight decay bn bias

train_bn

It controls if BatchNorm layers are trained even when they are supposed to be frozen according to the splitter.

moms

momentums

Value

None

Examples

## Not run: 

learn = GANLearner_wgan(dls, generator, critic, opt_func = partial(Adam(), mom=0.))


## End(Not run)


[Package fastai version 2.2.2 Index]