nn

Module containing native torch layer-specific symbolic information and implementations.

Classes

SymDepth

A symbolic parameter representing depth.

class SymDepth

Bases: Symbol

A symbolic parameter representing depth.

__init__(*args, max_depth, **kwargs)

Constructor.

disable(_memo=None)

Disable symbol.

Parameters:

_memo (Set[Symbol] | None) –

Return type:

None

is_skippable(idx)

Return whether idx is skippable.

Parameters:

idx (int) –

Return type:

bool

Link to another symbol.

Parameters:

sp_parent (Symbol) –

Return type:

None

property max_depth: int

Return max depth.

property min_depth: int

Return min depth.

set_skippable(idx, val)

Set whether idx is skippable.

Parameters:
  • idx (int) –

  • val (bool) –

Return type:

None

property skippable_idxs: List[int]

Return sorted list of skippable idxs.