API for multiscale architectures

Multiscale architectures are suitable for image modeling.

Classic multiscale architectures

class torchflows.architectures.MultiscaleNICE(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)

Multiscale version of NICE.

References:
__init__(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)

Bijection constructor.

Parameters:
  • event_shape – shape of the event tensor.

  • context_shape – shape of the context tensor.

  • kwargs – unused.

class torchflows.architectures.MultiscaleRealNVP(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)

Multiscale version of Real NVP.

Reference: Dinh et al. “Density estimation using Real NVP” (2017); https://arxiv.org/abs/1605.08803.

__init__(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)

Bijection constructor.

Parameters:
  • event_shape – shape of the event tensor.

  • context_shape – shape of the context tensor.

  • kwargs – unused.

class torchflows.architectures.MultiscaleRQNSF(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)

Multiscale version of C-RQNSF.

References:
__init__(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)

Bijection constructor.

Parameters:
  • event_shape – shape of the event tensor.

  • context_shape – shape of the context tensor.

  • kwargs – unused.

class torchflows.architectures.MultiscaleLRSNSF(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)

Multiscale version of C-LRS.

References:
__init__(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)

Bijection constructor.

Parameters:
  • event_shape – shape of the event tensor.

  • context_shape – shape of the context tensor.

  • kwargs – unused.

class torchflows.bijections.finite.multiscale.architectures.MultiscaleDeepSigmoid(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)
__init__(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)

Bijection constructor.

Parameters:
  • event_shape – shape of the event tensor.

  • context_shape – shape of the context tensor.

  • kwargs – unused.

class torchflows.bijections.finite.multiscale.architectures.MultiscaleDenseSigmoid(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)
__init__(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)

Bijection constructor.

Parameters:
  • event_shape – shape of the event tensor.

  • context_shape – shape of the context tensor.

  • kwargs – unused.

class torchflows.bijections.finite.multiscale.architectures.MultiscaleDeepDenseSigmoid(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)
__init__(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)

Bijection constructor.

Parameters:
  • event_shape – shape of the event tensor.

  • context_shape – shape of the context tensor.

  • kwargs – unused.

Glow-style multiscale architectures

class torchflows.architectures.AffineGlow(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)
__init__(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)

Bijection constructor.

Parameters:
  • event_shape – shape of the event tensor.

  • context_shape – shape of the context tensor.

  • kwargs – unused.

class torchflows.architectures.ShiftGlow(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)
__init__(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)

Bijection constructor.

Parameters:
  • event_shape – shape of the event tensor.

  • context_shape – shape of the context tensor.

  • kwargs – unused.

class torchflows.bijections.finite.multiscale.architectures.RQSGlow(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)
__init__(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)

Bijection constructor.

Parameters:
  • event_shape – shape of the event tensor.

  • context_shape – shape of the context tensor.

  • kwargs – unused.

class torchflows.bijections.finite.multiscale.architectures.LRSGlow(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)
__init__(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)

Bijection constructor.

Parameters:
  • event_shape – shape of the event tensor.

  • context_shape – shape of the context tensor.

  • kwargs – unused.

class torchflows.bijections.finite.multiscale.architectures.DeepSigmoidGlow(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)
__init__(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)

Bijection constructor.

Parameters:
  • event_shape – shape of the event tensor.

  • context_shape – shape of the context tensor.

  • kwargs – unused.

class torchflows.bijections.finite.multiscale.architectures.DenseSigmoidGlow(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)
__init__(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)

Bijection constructor.

Parameters:
  • event_shape – shape of the event tensor.

  • context_shape – shape of the context tensor.

  • kwargs – unused.

class torchflows.bijections.finite.multiscale.architectures.DeepDenseSigmoidGlow(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)
__init__(event_shape: int | Size | Tuple[int, ...], n_layers: int = None, **kwargs)

Bijection constructor.

Parameters:
  • event_shape – shape of the event tensor.

  • context_shape – shape of the context tensor.

  • kwargs – unused.