Package: luz 0.4.0.9002

Daniel Falbel

luz: Higher Level 'API' for 'torch'

A high level interface for 'torch' providing utilities to reduce the the amount of code needed for common tasks, abstract away torch details and make the same code work on both the 'CPU' and 'GPU'. It's flexible enough to support expressing a large range of models. It's heavily inspired by 'fastai' by Howard et al. (2020) <arxiv:2002.04688>, 'Keras' by Chollet et al. (2015) and 'PyTorch Lightning' by Falcon et al. (2019) <doi:10.5281/zenodo.3828935>.

Authors:Daniel Falbel [aut, cre, cph], Christophe Regouby [ctb], RStudio [cph]

luz_0.4.0.9002.tar.gz
luz_0.4.0.9002.zip(r-4.5)luz_0.4.0.9002.zip(r-4.4)luz_0.4.0.9002.zip(r-4.3)
luz_0.4.0.9002.tgz(r-4.4-any)luz_0.4.0.9002.tgz(r-4.3-any)
luz_0.4.0.9002.tar.gz(r-4.5-noble)luz_0.4.0.9002.tar.gz(r-4.4-noble)
luz_0.4.0.9002.tgz(r-4.4-emscripten)luz_0.4.0.9002.tgz(r-4.3-emscripten)
luz.pdf |luz.html
luz/json (API)
NEWS

# Install 'luz' in R:
install.packages('luz', repos = c('https://mlverse.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/mlverse/luz/issues

On CRAN:

44 exports 79 stars 3.98 score 28 dependencies 1 dependents 230 scripts 717 downloads

Last updated 15 hours agofrom:bc41ef1053. Checks:OK: 5 NOTE: 2. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 17 2024
R-4.5-winNOTESep 17 2024
R-4.5-linuxNOTESep 17 2024
R-4.4-winOKSep 17 2024
R-4.4-macOKSep 17 2024
R-4.3-winOKSep 17 2024
R-4.3-macOKSep 17 2024

Exports:%>%acceleratoras_dataloaderevaluatefitget_metricslr_finderluz_callbackluz_callback_auto_resumeluz_callback_csv_loggerluz_callback_early_stoppingluz_callback_gradient_clipluz_callback_interruptluz_callback_keep_best_modelluz_callback_lr_schedulerluz_callback_metricsluz_callback_mixed_precisionluz_callback_mixupluz_callback_model_checkpointluz_callback_profileluz_callback_progressluz_callback_resume_from_checkpointluz_callback_tfeventsluz_callback_train_validluz_loadluz_load_checkpointluz_load_model_weightsluz_metricluz_metric_accuracyluz_metric_binary_accuracyluz_metric_binary_accuracy_with_logitsluz_metric_binary_aurocluz_metric_maeluz_metric_mseluz_metric_multiclass_aurocluz_metric_rmseluz_metric_setluz_saveluz_save_model_weightsnn_mixup_lossnnf_mixupset_hparamsset_opt_hparamssetup

Dependencies:bitbit64callrclicorocrayondescfsgenericsgluehmsjsonlitelifecyclemagrittrpkgconfigprettyunitsprocessxprogresspspurrrR6Rcpprlangsafetensorstorchvctrswithrzeallot

Accelerator API

Rendered fromaccelerator.Rmdusingknitr::rmarkdownon Sep 17 2024.

Last update: 2022-05-03
Started: 2021-05-24

Custom loops with luz

Rendered fromcustom-loop.Rmdusingknitr::rmarkdownon Sep 17 2024.

Last update: 2023-05-14
Started: 2021-05-10

Get started with luz

Rendered fromget-started.Rmdusingknitr::rmarkdownon Sep 17 2024.

Last update: 2023-04-14
Started: 2021-04-23

Readme and manuals

Help Manual

Help pageTopics
Create an acceleratoraccelerator
Creates a dataloader from its inputas_dataloader as_dataloader.array as_dataloader.dataloader as_dataloader.dataset as_dataloader.iterable_dataset as_dataloader.list as_dataloader.matrix as_dataloader.numeric as_dataloader.torch_tensor
Context objectcontext
Context objectctx
Evaluates a fitted model on a datasetevaluate
Fit a 'nn_module'fit.luz_module_generator
Get metrics from the objectget_metrics get_metrics.luz_module_fitted
Learning Rate Finderlr_finder
Create a new callbackluz_callback
Resume training callbackluz_callback_auto_resume
CSV logger callbackluz_callback_csv_logger
Early stopping callbackluz_callback_early_stopping
Gradient clipping callbackluz_callback_gradient_clip
Interrupt callbackluz_callback_interrupt
Keep the best modelluz_callback_keep_best_model
Learning rate scheduler callbackluz_callback_lr_scheduler
Metrics callbackluz_callback_metrics
Automatic Mixed Precision callbackluz_callback_mixed_precision
Mixup callbackluz_callback_mixup
Checkpoints model weightsluz_callback_model_checkpoint
Profile callbackluz_callback_profile
Progress callbackluz_callback_progress
Allow resume model training from a specific checkpointluz_callback_resume_from_checkpoint
tfevents callbackluz_callback_tfevents
Train-eval callbackluz_callback_train_valid
Load trained modelluz_load
Loads a checkpointluz_load_checkpoint
Loads model weights into a fitted object.luz_load_model_weights luz_save_model_weights
Creates a new luz metricluz_metric
Accuracyluz_metric_accuracy
Binary accuracyluz_metric_binary_accuracy
Binary accuracy with logitsluz_metric_binary_accuracy_with_logits
Computes the area under the ROCluz_metric_binary_auroc
Mean absolute errorluz_metric_mae
Mean squared errorluz_metric_mse
Computes the multi-class AUROCluz_metric_multiclass_auroc
Root mean squared errorluz_metric_rmse
Creates a metric setluz_metric_set
Saves luz objects to diskluz_save
Loss to be used with 'callbacks_mixup()'.nn_mixup_loss
Mixup logicnnf_mixup
Create predictions for a fitted modelpredict.luz_module_fitted
Set hyper-parameter of a moduleset_hparams
Set optimizer hyper-parametersset_opt_hparams
Set's up a 'nn_module' to use with luzsetup