Skip to content

Main content

Activation: Glu Gate Partial Derivative Tool

Return both local partial derivatives of value*sigmoid(gate), not an automatic-differentiation engine.

Loading tool…

Description

For GLU=value*sigmoid(gate), set s=sigmoid(gate).

A scalar gated linear unit multiplies a value coordinate by a sigmoid of a gate coordinate. Differentiating the value holds the gate fixed; differentiating the gate holds the value fixed. These two partials are different components of a gradient.

For GLU=value*sigmoid(gate), set s=sigmoid(gate).

When to use this tool

Use Activation: Glu Gate Partial Derivative when checking the stated gated-linear-unit scalar partial derivative convention.

How to use the tool and how it works

  1. Enter value, gate. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read result. Expand result to inspect the returned fields.

For GLU=value*sigmoid(gate), set s=sigmoid(gate). Return valuePartial=s and gatePartial=value*s*(1-s).1

A gated linear unit combines a value with a sigmoid gate. This tool exposes the two scalar partial derivatives without performing the complete convolutional or tensor computation.2

Input fieldMeaning and unitsAccepted input
valueValueRequired. Finite number.
gateGateRequired. Finite number.
Output fieldInterpretationReturned shape
resultObject containing the operation-specific returned members listed below.Required. Object.
result.valuePartialValue PartialCalculated result member: number.
result.gatePartialGate PartialCalculated result member: number.
json
{
  "input": {
    "value": 4,
    "gate": 0
  },
  "output": {
    "result": {
      "valuePartial": 0.5,
      "gatePartial": 1
    }
  }
}

Limitations and assumptions

  • These are two scalar partial derivatives with the other coordinate held fixed; no tensor split, network gradient or gate training is performed.
  • Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use the complete explicit function and the intended parameter, branch and numerical conventions for symbolic, tensor or model-level differentiation; assess training behavior independently.

References

  1. Calculation and input contract: activation/glu-gate-partial-derivative — tool.io

  2. Language Modeling with Gated Convolutional Networks — Yann N. Dauphin and coauthors

Similar or alternative tools