Initialization#
braintools.init describes how to create parameter arrays: weights, biases, time constants, initial states. An initializer is a small object that, called with a shape, returns the values, with brainunit units carried through.
What you’ll find here#
Basic distributions:
Constant,ZeroInit,Uniform,Normal,TruncatedNormal,LogNormal,Gamma,Exponential,Weibull, andBeta, each checked against its exact mean and standard deviation; reproducible sampling withrng=orbrainstate.random.seed; units; truncation versus clipping.Variance scaling and orthogonal methods: Kaiming, Xavier, and LeCun as presets of
VarianceScaling, the(in, out)/(*spatial, in, out)fan convention shared withbrainstatelayers, a signal-propagation experiment, andOrthogonal,DeltaOrthogonal, andIdentityfor recurrent and very deep networks.Distance profiles: the exact formula of every profile, unit handling, why
DoGProfileandMexicanHatProfileare clipped at zero, composing profiles with arithmetic,.clip,.apply, and|, and turning a profile into a connectivity pattern.Composite and distance-modulated initialization: arithmetic on initializers,
Compose,Scaled,Clipped,Mixture,Conditional,DistanceModulatedwith positions or distances, a spatial E/I weight matrix, andparam.
For the full list of classes and parameters, see the API reference.