Module: oryx.core.interpreters.inverse.custom_inverse
Stay organized with collections
Save and categorize content based on your preferences.
Contains logic for defining custom inverses for functions.
Automatic inversion works for only a certain class of functions (see
core.inverse
documentation for more details). For example, an
autoregressive neural network will likely use masked weight matrices in order
to be invertible but the automatic inversion is not aware of autoregressive
masked matrices (yet!). Furthermore, we may want more numerically stable
inverses for functions like softmax or sigmoid.
This module provides a custom_inverse
decorator for Python functions that
enables overriding the default programmatic inversion. See custom_inverse
for further documentation.
Classes
class NonInvertibleError
: Raised by a custom inverse definition when values are unknown.
Functions
custom_inverse(...)
: Decorates a function to enable defining a custom inverse.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-05-23 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-05-23 UTC."],[],[]]