Serializable defines the serialization contract.

TFJS requires serializable classes to return their className when asked to avoid issues with minification.

Hierarchy

Methods

  • Return the class name for this class to use in serialization contexts.

    Generally speaking this will be the same thing that constructor.name would have returned. However, the class name needs to be robust against minification for serialization/deserialization to work properly.

    There's also places such as initializers.VarianceScaling, where implementation details between different languages led to different class hierarchies and a non-leaf node is used for serialization purposes.

    Returns string

  • Return all the non-weight state needed to serialize this object.

    Returns ConfigDict

  • Type Parameters

    Parameters

    Returns T

    Nocollapse

Generated using TypeDoc