Repository navigation
Conversation
Normalizing flows for multichannel sequences of shape (B, C, L), e.g. 2D keypoint trajectories over a gait cycle. New components: * nets.ConvNet1d: 1D conv subnet (zero-init last layer, optional ActNorm, configurable padding_mode). * flows.Invertible1x1Conv1d: LU-parameterized invertible 1x1 conv for NCL tensors (log-det scaled by L), reusing the existing guardrails. * flows.CouplingBlock1d: channel-split affine coupling with bounded log-scales (s_cap * tanh) and optional shift cap. * flows.GlowBlock1d: ActNorm -> Invertible1x1Conv1d -> coupling, with configurable kernel_size and the same nan/gen_clamp guards as 2D/3D. * ConvFlow1d: single-scale stack of K coupling or Glow blocks over a DiagGaussian((C, L)) base. * Permute(mode="reverse"). Design notes: * padding_mode="circular" makes the couplings equivariant to circular time shifts (periodic signals); default stays "zeros" as in 2D/3D. * actnorm_s_cap (default 5.0) is decoupled from scale_cap (0.5) so ActNorm can standardize unscaled inputs. * ConvFlow1d.sample() accepts temperature (as MultiscaleFlow.sample) and restores the base temperature afterwards. Tests perturb all weights (zero-init couplings are otherwise the identity) and check, in float64, non-trivial transforms, round trips, log-det against the autograd Jacobian, log_prob consistency, circular equivariance, ActNorm standardization and tempered sampling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Normalizing flows for multichannel sequences of shape (B, C, L), e.g. 2D keypoint trajectories over a gait cycle.
New components:
Design notes:
Tests perturb all weights (zero-init couplings are otherwise the identity) and check, in float64, non-trivial transforms, round trips, log-det against the autograd Jacobian, log_prob consistency, circular equivariance, ActNorm standardization and tempered sampling.