pyFDN.trainable_fdn#
- pyFDN.trainable_fdn(*, delays=None, N=None, rt=2.0, matrix='orthogonal', A=None, B=None, C=None, D=0.0, trainable=None, train_rt=False, fs=48000.0, nfft=65536, alias_decay_db=None, device=None, dtype=None, rng=None)[source]#
Build a trainable flamo
Shellfrom a config.- Parameters:
delays (
ndarray|None) – Explicit integer delay lengths in samples. If omitted,Ncoprime delays are sampled (pyFDN.sample_delay_lengths()).N (
int|None) – Number of delay lines whendelaysis omitted.rt (
float|tuple[float,float] |None) – Reverberation time in seconds, realized as anAttenuationFilterwithdesign="first_order_shelf".Nonebuilds a lossless FDN. For any other design, build the module yourself and pass it totrainable_from_dss()aspost_delay=.matrix (
Literal['orthogonal','random']) – Feedback-matrix parametrization.A (
ndarray|None) – Initial(N, N)feedback matrix; defaults to a random SO(N) matrix.B (
ndarray|None) –B((N, n_in)) andC((n_out, N)); default ones / sqrt(N).C (
ndarray|None) –B((N, n_in)) andC((n_out, N)); default ones / sqrt(N).D (
float|ndarray) – Direct pathD; a scalar fills(n_out, n_in).trainable (
Trainable|None) – Which gain groups are trained (defaultTrainable).train_rt (
bool) – Whetherrtis a parameter rather than a design. Off by default, since the decay is usually designed from a measured reverberation time. What trains is the reverberation time itself, which keeps the loop contractive for every value it can take – unlike raw filter coefficients, which nothing holds inside the unit circle.alias_decay_db (
float|None) – Anti-time-aliasing decay, seetrainable_from_dss().None(default) picksLOSSLESS_ALIAS_DECAY_DBwhenrt is None, else 0.fs (
float)nfft (
int)device (
Any)dtype (
Any)rng (
Generator|int|None) – Seed for the sampled delays / default feedback matrix.
- Return type: