graph

Utility functions for computational graph.

Functions

match

Check if a module matches any of the patterns.

match(module, patterns)

Check if a module matches any of the patterns.

Parameters:
  • module (Module) – The module to be checked.

  • patterns (Sequence[Module]) – The patterns to be matched.

Returns:

True if the module matches any of the patterns, False otherwise.

Return type:

bool