Skip to content

Confusing distrax.Chain syntax #324

@tristan-shah

Description

@tristan-shah

The syntax for constructing a chain is very confusing and inconsistent with most other libraries which build chains of functions.

For example:

  bijector = distrax.Chain([
      distrax.ScalarAffine(shift = shift, scale = scale),
      distrax.Tanh()
  ])

first applies Tanh and then applies ScalarAffine. Intuitively it should be the other way around.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions