Skip to main content

Flag

Enum Flag 

Source
pub enum Flag {
Show 16 variants Nan, Inf, Vanishing, Exploding, MissingNormalisation, Dead, Saturated, Stalled, Overstepping, DeadChannels(usize), IgnoredChannels(usize), Leakage, Narrowing, IgnoredInput(String), SoleReliance(String), LosingPlasticity,
}
Expand description

One thing that looks wrong with a node.

An enum because the set is closed and named: a diagnosis is only useful if two runs of it say the same word for the same thing. Every variant is an opinion at a threshold and none of them is a fact — the facts are in the record; these are what somebody thinks of them.

Variants§

§

Nan

A number stopped being a number. Nothing below it means anything.

§

Inf

Or stopped being finite.

§

Vanishing

The parameter gradients are so small this node is not being trained. The classic depth pathology, and a profile over depth rather than a property of a network: the early layers go quiet while the last learns.

§

Exploding

The parameter gradients are so large the next step will not be a step.

§

MissingNormalisation

The signal has grown over a stretch nobody is normalising.

A conjunction, and both halves are load-bearing: the structural half is baked into the measurement, which counts the gain from the last normalisation upstream. A badly-initialised stack with a norm layer drifts under 3x and trains.

One-sided, and measured rather than assumed: it says nothing about a signal that shrank, because Adam is scale-invariant per parameter. See health/tests/normalisation.py.

§

Dead

Most of what this node outputs is zero, on at least one step.

Read off the maximum over the window: a layer that dies one step in four is dead, and the mean is exactly what hides it.

§

Saturated

Most of what it outputs is pinned at the far end of its non-linearity, where the derivative is nothing. Also read off the maximum.

§

Stalled

It is moving, but by so little relative to its own weights that it will not arrive. The ratio of update to weight, which practice puts near 1e-3 — the cheapest signal there is.

§

Overstepping

It is moving so much relative to its own weights that each step throws away where it was.

§

DeadChannels(usize)

How many channels are dead — output near zero across the window. Separate from Flag::Dead: a layer can be alive with a quarter of its width doing nothing, which is a width problem and not a layer problem.

§

IgnoredChannels(usize)

How many channels are alive and never asked for: they compute something and no gradient comes back. Gradient starvation, and a dormant channel is not the same thing — it is computing nothing to be ignored.

§

Leakage

Two groups of channels the architecture means to keep apart are carrying the same information, by linear CKA.

§

Narrowing

The update has collapsed into a few directions compared with what this run was doing before. The earliest warning there is: it moves thousands of steps before the loss does.

§

IgnoredInput(String)

An input the model is not using: taking it away costs nothing. A network with a perfectly healthy gradient can be ignoring an input all afternoon without a single other flag firing.

§

SoleReliance(String)

One input carries everything, and nothing else would take over.

Not a failure and not always wrong: sometimes one channel really is the signal. It is worth knowing before the day that channel is missing.

§

LosingPlasticity

The weights keep growing, the representation keeps narrowing and the units keep going quiet — all three at once, which is what tells a network that has stopped being able to learn from one that is training.

Implementations§

Source§

impl Flag

Source

pub fn name(&self) -> &'static str

The word this flag is written down as, which is what a record keeps and what somebody greps for.

Source

pub fn family(&self) -> &'static str

Which family of trouble this is. A closed set, so a figure can give each family a colour instead of painting everything one red. By what to do about them and not by what was measured: VANISHING and EXPLODING are both answered by looking at depth and initialisation.

Source

pub fn about(&self) -> &'static str

What to do about it, in one line. Part of the flag and not of whoever draws it: the thresholds and the advice are the same opinion.

Trait Implementations§

Source§

impl Clone for Flag

Source§

fn clone(&self) -> Flag

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Flag

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Flag

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Flag

Source§

fn eq(&self, other: &Flag) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Flag

Source§

impl StructuralPartialEq for Flag

Auto Trait Implementations§

§

impl Freeze for Flag

§

impl RefUnwindSafe for Flag

§

impl Send for Flag

§

impl Sync for Flag

§

impl Unpin for Flag

§

impl UnsafeUnpin for Flag

§

impl UnwindSafe for Flag

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.