MCPcopy Create free account
hub / github.com/tensorflow/lingvo / MultiTaskProjection

Function MultiTaskProjection

lingvo/core/py_utils.py:6950–7082  ·  view source on GitHub ↗

Applies a multi-task projection. Calculates the projection of a batched input tensor, where the projection parameters (weights, bias) can be from a different 'task' for each batch. Args: weights: projection weight matrices of all tasks, size [num_tasks, input_dim, output_dim] b

(
    weights: tf.Tensor,
    biases: Optional[tf.Tensor],
    inputs: tf.Tensor,
    tasks: tf.Tensor,
    einsum_order: str,
    quant_layer,  # quant_utils.QuantizableLayer, would be circular import
    w_q_name: str,
    w_q_domain: str = 'default',
    qat_output: bool = False,
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 9

HasRankFunction · 0.85
GetShapeFunction · 0.85
HasShapeFunction · 0.85
GetRankFunction · 0.85
QWeightMethod · 0.80
gatherMethod · 0.80
ToAqtWeightMethod · 0.45
FromAqtMatmulMethod · 0.45
FromAqtWeightMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…