luz0.5.1 package

Higher Level 'API' for 'torch'

accelerator

Create an accelerator

as_dataloader

Creates a dataloader from its input

context

Context object

ctx

Context object

evaluate

Evaluates a fitted model on a dataset

fit.luz_module_generator

Fit a nn_module

get_metrics

Get metrics from the object

lr_finder

Learning Rate Finder

luz_callback_auto_resume

Resume training callback

luz_callback_csv_logger

CSV logger callback

luz_callback_early_stopping

Early stopping callback

luz_callback_gradient_clip

Gradient clipping callback

luz_callback_interrupt

Interrupt callback

luz_callback_keep_best_model

Keep the best model

luz_callback_lr_scheduler

Learning rate scheduler callback

luz_callback_metrics

Metrics callback

luz_callback_mixed_precision

Automatic Mixed Precision callback

luz_callback_mixup

Mixup callback

luz_callback_model_checkpoint

Checkpoints model weights

luz_callback_profile

Profile callback

luz_callback_progress

Progress callback

luz_callback_resume_from_checkpoint

Allow resume model training from a specific checkpoint

luz_callback_tfevents

tfevents callback

luz_callback_train_valid

Train-eval callback

luz_callback

Create a new callback

luz_load_checkpoint

Loads a checkpoint

luz_load_model_weights

Loads model weights into a fitted object.

luz_load

Load trained model

luz_metric_accuracy

Accuracy

luz_metric_binary_accuracy_with_logits

Binary accuracy with logits

luz_metric_binary_accuracy

Binary accuracy

luz_metric_binary_auroc

Computes the area under the ROC

luz_metric_mae

Mean absolute error

luz_metric_mse

Mean squared error

luz_metric_multiclass_auroc

Computes the multi-class AUROC

luz_metric_rmse

Root mean squared error

luz_metric_set

Creates a metric set

luz_metric

Creates a new luz metric

luz_save

Saves luz objects to disk

nn_mixup_loss

Loss to be used with callbacks_mixup().

nnf_mixup

Mixup logic

pipe

Pipe operator

predict.luz_module_fitted

Create predictions for a fitted model

reexports

Objects exported from other packages

set_hparams

Set hyper-parameter of a module

set_opt_hparams

Set optimizer hyper-parameters

setup

Set's up a nn_module to use with luz

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) <doi:10.48550/arXiv.2002.04688>, 'Keras' by Chollet et al. (2015) and 'PyTorch Lightning' by Falcon et al. (2019) <doi:10.5281/zenodo.3828935>.

  • Maintainer: Daniel Falbel
  • License: MIT + file LICENSE
  • Last published: 2025-10-30