sgr_get_model: Get a pretrained StyleGAN3 model

View source: R/stylegan_models.R

sgr_get_modelR Documentation

Get a pretrained StyleGAN3 model

Description

The model will be downloaded to a local directory if you do not have it already. otherwise the locally cached version will be used.

Usage

sgr_get_model(
  model_name = c("afhqv2"),
  flavour = c("r", "t"),
  res = c("512", "1024"),
  dir = rappdirs::user_data_dir("styleganr"),
  device = c("cpu", "cuda")
)

Arguments

model_name

Name of the model

flavour

The flavour of the model: 'r' for rotation-invariant, 't' for translation invariant.

res

The resolution of the model.

dir

Directory to save the model to. By default it will be saved to your user data directory.

device

Device to load the model onto: 'cpu' or 'gpu'

Value

A torch::nn_module() object.


rdinnager/styleganr documentation built on Nov. 9, 2022, 6:09 a.m.