MCPcopy Create free account

hub / github.com/tensorflow/lingvo / functions

Functions9,552 in github.com/tensorflow/lingvo

↓ 15 callersMethodGetMeta
Gets metadata for the batch.
lingvo/core/datasource.py:80
↓ 15 callersMethodParams
(cls)
lingvo/tasks/car/input_extractor_test.py:111
↓ 15 callersMethodRun
Runs predictor. Args: fetch_keys: dict_keys object or a list of keys in the fetch dictionary to fetch. validate_fetches: if T
lingvo/core/predictor.py:308
↓ 15 callersMethodSetStatusMessage
Write to borglet status.
lingvo/core/program.py:343
↓ 15 callersMethodStreamStep
(self, theta, inputs, paddings, state0)
lingvo/core/bn_layers.py:1335
↓ 15 callersMethodToTensorShape
Converts to a possibly partially specified tf.TensorShape.
lingvo/core/tshape.py:108
↓ 15 callersMethod_AdjustMSplit
Adjusts split annotation according to model_dim_reshape_segments.
lingvo/core/gshard_builder.py:292
↓ 15 callersMethod_Dropout
Returns a DropoutLayer Params.
lingvo/core/batch_major_attention.py:8742
↓ 15 callersMethod_EinsumWithModelDim
Einsum with adjusted equation according to model_dim_reshape_segments. It changes each dimension named 'M' in the equation into two dimensions 'N
lingvo/core/gshard_builder.py:2341
↓ 15 callersMethod_ReshapedModelDims
Returns the dimensions that M is reshaped into.
lingvo/core/gshard_builder.py:2322
↓ 15 callersMethod__init__
(self, params)
lingvo/core/layers_with_attention.py:2104
↓ 14 callersMethodCommonParams
(cls, input_dim=None, kernel_size=None, is_causal=Fal
lingvo/core/conformer_layer.py:147
↓ 14 callersMethodDelete
Deletes multiple parameters. Dots in names indicate navigation into nested Params objects. We do not allow navigation into lists or dicts, an
lingvo/core/hyperparams.py:495
↓ 14 callersMethodEmbLookupDefaultTheta
(self, ids)
lingvo/core/layers.py:2653
↓ 14 callersMethodFPropMeta
(cls, p, inputs)
lingvo/core/layers.py:5092
↓ 14 callersMethodFilter
Returns a copy with entries where fn(entry) is True.
lingvo/core/nested_map.py:493
↓ 14 callersMethodFromAqtMatmul
Rescales the output corresponding to AQT quantized matmuls. Refer to quantizable_layer.FromAqtOutput. Args: w_name: weight name.
lingvo/core/quant_utils.py:918
↓ 14 callersMethodGaussianSqrtDim
scale * tf.random.normal(0, 1 / sqrt(dim0)).
lingvo/core/py_utils.py:1150
↓ 14 callersFunctionHasRank
Syntactic sugar for asserting that tensor has the expected rank.
lingvo/core/py_utils.py:388
↓ 14 callersMethodInfeedBatchSize
(self)
lingvo/tasks/mt/model_test.py:51
↓ 14 callersMethodInitialize
(self, sess=None)
lingvo/core/datasource.py:61
↓ 14 callersMethodNumClasses
Total number of classes for the dataset.
lingvo/tasks/car/evaluation_metadata.py:34
↓ 14 callersMethodParams
(cls)
lingvo/core/datasource.py:42
↓ 14 callersMethodParams
Default parameters for Programs.
lingvo/core/program.py:93
↓ 14 callersMethodToAqtInputs
Quantizes weights and activations for (act * w) matmul AQT style. Refer to quantizable_layer.ToAqtInputs. Args: w_name: Previously cre
lingvo/core/quant_utils.py:892
↓ 14 callersFunction_AttentionInputs
(input_dim=4, dtype=tf.float32, is_causal=True)
lingvo/core/batch_major_attention_test.py:1270
↓ 14 callersMethod_CheckStaticShapes
Static shape must be set correctly for RNN beam search compatibility.
lingvo/core/attention_test.py:29
↓ 14 callersMethod_Linear
(self, name, input_dim, output_dim, mesh_split, qdomain=None)
lingvo/core/batch_major_attention.py:9929
↓ 14 callersMethod_Linear
Linear layer. y = matmul([..., idims], [idims, odims]).
lingvo/core/builder.py:303
↓ 14 callersMethod_MultiHeadedAttentionInputs
(self, source_dim=4, dtype=tf.float32)
lingvo/core/attention_test.py:579
↓ 14 callersMethod_RunSimpleFullSoftmax
( self, num_shards=1, chunk_size=0, inputs=None, class_ids=None, class_wei
lingvo/core/softmax_layers_test.py:35
↓ 14 callersMethod_SetStatusMessage
Update the status message for this task.
lingvo/base_runner.py:170
↓ 14 callersMethod__init__
(self, params)
lingvo/core/schedule.py:957
↓ 14 callersMethod_zero_aux_loss
(self, name)
lingvo/core/gshard_builder.py:1733
↓ 14 callersMethodread_value
Reads the variable and converts it to manually sharded mode. Returns: The return value has the shape of the individual elements of the stac
lingvo/core/var_tmp_wrappers.py:155
↓ 14 callersMethodwatch
If in eager mode, watch the provided tensors on the GradientTape.
lingvo/core/test_utils.py:93
↓ 13 callersFunctionAddPreprocessor
Add a new preprocessor before an existing preprocessor. Args: input_p: The input params. name: A string with the name of the new preprocess
lingvo/tasks/car/params/waymo_deepfusion.py:100
↓ 13 callersMethodAddSentence
Accumulates ngram statistics for the given ref and hyp string pair.
lingvo/core/scorers.py:94
↓ 13 callersMethodComputeOverallScore
Computes overall BLEU score from the statistics accumulated so far.
lingvo/core/scorers.py:114
↓ 13 callersMethodFProp
r"""Applies a function (p.fn) on args. Args: theta: Unused. *args: A tuple of Tensors (one or more). Returns: fn(\*args).
lingvo/core/builder_layers.py:1349
↓ 13 callersMethodGetDescendant
Returns a descendant layer given the path. Args: path: a dot separated string denoting a descendant of this layer. Returns: The
lingvo/core/base_layer.py:531
↓ 13 callersFunctionGetDtypeMin
(dtype=tf.float32)
lingvo/core/batch_major_attention.py:156
↓ 13 callersMethodInitStates
Initialize 'states' with .key, .value, and .key_dists.
lingvo/core/batch_major_attention.py:4639
↓ 13 callersMethodPrepareExternalInputs
Does not modify the external_inputs parameter. This parameter, if provided, is assumed to be a vector that should be concatenated with the ot
lingvo/core/steps/rnn_steps.py:36
↓ 13 callersMethodQRAct
(self, act, dist: QDistribution)
lingvo/core/quant_utils.py:780
↓ 13 callersMethodRestore
Restore variables from a checkpoint. Args: sess: A session with tf.Graph under which this object is constructed. path: If not None, r
lingvo/core/saver.py:531
↓ 13 callersMethodStop
(self)
lingvo/core/py_utils.py:6937
↓ 13 callersFunctionToUnicode
(text)
lingvo/core/plot.py:36
↓ 13 callersMethodVLog
Logs the debug string at the level.
lingvo/core/nested_map.py:523
↓ 13 callersMethodZeroAttentionState
(self, source_length, decoder_batch_size)
lingvo/core/attention.py:941
↓ 13 callersMethodZeroState
Returns the zero_state for the RNN cell. Args: theta: Variables used by the RNNCell. prepared_inputs: unused. batch_size: An in
lingvo/core/steps/rnn_steps.py:51
↓ 13 callersMethod_runBeamSearchOpHelper
(self, hyp_size, num_beams,
lingvo/core/ops/beam_search_step_op_test.py:36
↓ 12 callersMethodFilterKeyVal
Returns a copy of this `.NestedMap` filtered by fn. If fn(key, entry) is True, the entry is copied into the returned NestedMap. Otherwise, it
lingvo/core/nested_map.py:497
↓ 12 callersMethodFromText
Merges params specified in 'text' into 'params'. 'text' follows the simple text format as produced by ToText. For a param specified in both '
lingvo/core/hyperparams.py:869
↓ 12 callersMethodParams
(cls)
lingvo/core/checkpointer_eager_test.py:51
↓ 12 callersMethodParams
(cls)
lingvo/tasks/image/classifier.py:104
↓ 12 callersMethodSeq
Returns a stack of sequential layers.
lingvo/core/batch_major_attention.py:9124
↓ 12 callersMethodStartRunners
Runs `all_runners` in parallel threads. Returns when all of them finish. Args: all_runners: a list of `.BaseRunner`. Returns:
lingvo/trainer.py:575
↓ 12 callersMethodUpdateTheta
Returns theta with state.
lingvo/core/gshard_layers.py:1263
↓ 12 callersMethod_ApplyFn
Apply fn over the input tuple.
lingvo/tasks/car/builder_lib.py:270
↓ 12 callersMethod_ClipExample
Returns a tuple of (neg, pos) for clipped neg/pos values of v.
lingvo/core/quant_utils_test.py:281
↓ 12 callersMethod_CreateFrontendParams
(self)
lingvo/tasks/asr/frontend_test.py:45
↓ 12 callersFunction_Dense
(sparse, default_value=0)
lingvo/tasks/car/kitti_input_generator.py:28
↓ 12 callersMethod_EncoderParams
(self, vn_config)
lingvo/tasks/asr/encoder_test.py:25
↓ 12 callersFunction_FromGlobal
Get 'field_name' from a global configuration object. Currently the global configuration object used is FLAGS, but this may change to Cluster() or
lingvo/core/py_utils_flags.py:101
↓ 12 callersMethod_GetParams
(self, **custom_kwargs)
lingvo/core/conformer_layer_test.py:126
↓ 12 callersFunction_NewOrHistoricSplit
(t, t_split)
lingvo/core/gshard_layers.py:3065
↓ 12 callersMethod_RecursiveMap
( self: NestedMapT, fn: Callable[[str, Any], Any], flatten: Literal[False] = False, )
lingvo/core/nested_map.py:374
↓ 12 callersMethod_Stride
Strides the input sequence. Args: name: name of this layer. stride: To use every k-th token, set the stride to k. When stride == 0,
lingvo/core/batch_major_attention.py:9140
↓ 12 callersMethod_WriteToLog
Logs `text` and saves it under `logdir/filename`.
lingvo/base_runner.py:355
↓ 12 callersMethod_getNestedMapTestData
(self)
lingvo/tasks/car/builder_lib_test.py:152
↓ 11 callersFunctionGetRank
Returns tensor's rank as an int if it's available, otherwise a Tensor. Args: tensor: The input tensor. Returns: Either an int or a Tenso
lingvo/core/py_utils.py:417
↓ 11 callersMethodGetState
Gets a state tensor that can be used to calculate clipping. The state will be a float32 tensor that is safe to pass to TF functions. Args:
lingvo/core/quant_utils.py:1192
↓ 11 callersMethodLogits
FProp and returns the logits for the whole sequence.
lingvo/tasks/lm/layers.py:187
↓ 11 callersMethodParams
Params for this MergerLayer class.
lingvo/core/attention.py:3625
↓ 11 callersMethodParams
(cls)
lingvo/tasks/punctuator/input_generator.py:29
↓ 11 callersMethodSample
lingvo/tasks/car/ops/ps_utils.cc:471
↓ 11 callersMethodSet
r"""Sets the value for a nested key. There is limited support for indexing lists when square bracket indexing is used, e.g., key[0], key[1],
lingvo/core/nested_map.py:280
↓ 11 callersMethodTransformShapes
(self, shapes)
lingvo/tasks/car/input_preprocessors.py:3548
↓ 11 callersMethodTransformerStack
Returns a stack of num_layers self-attention layers.
lingvo/core/self_attention_layer.py:353
↓ 11 callersMethod_Activation
Activation layer.
lingvo/core/builder.py:330
↓ 11 callersMethod_Activation
(self, name, activation_fn_or_name=None)
lingvo/tasks/car/builder_lib.py:106
↓ 11 callersMethod_Bias
Bias layer. The bias is added to the last dimension of the input.
lingvo/core/conv_layers_builder.py:145
↓ 11 callersMethod_DotAtten
Computes the attention. Each query selects 'p.attention_window' number of keys to attend to. First we find the closest centroid to that query
lingvo/core/batch_major_attention.py:4544
↓ 11 callersMethod_ForwardPass
(self, p)
lingvo/tasks/asr/encoder_test.py:57
↓ 11 callersMethod_ShardedVar
Creates a layer of variables potentially sharded in a device mesh. Args: name: name of the layer. weights: list of (name, gshard_laye
lingvo/core/gshard_builder.py:327
↓ 11 callersMethod_SummarizeValue
(self, steps, tag, value)
lingvo/core/program.py:232
↓ 11 callersFunction_ToTuple
(x)
lingvo/core/gpipe.py:101
↓ 11 callersMethod_ZoneOut
Apply ZoneOut regularlization to cur_v. Implements ZoneOut regularization as described in https://arxiv.org/abs/1606.01305 Args: p
lingvo/core/rnn_cell.py:140
↓ 11 callersMethod__init__
(self, params)
lingvo/core/builder_layers.py:925
↓ 11 callersMethod_testLayerHelper
(self, test_case, p, expected=None,
lingvo/core/quant_test_lib.py:138
↓ 11 callersMethodapply
(self)
docs/apidoc/conf.py:208
↓ 11 callersMethodapply_gradients
Applies the gradients.
lingvo/core/optimizer.py:1319
↓ 11 callersFunctionuse_tpu
()
lingvo/core/py_utils_flags.py:152
↓ 10 callersMethodAttenProbs
Computes attention probs in a non vectorized way. Args: key: A numpy ndarray of shape [batch, seqlen, heads, dim]. query: A numpy nda
lingvo/core/batch_major_attention_test.py:1213
↓ 10 callersMethodDecoderLayerStack
Clean DecoderLayerStack, similar to EncoderLayerStack.
lingvo/core/gshard_builder.py:675
↓ 10 callersMethodDepthwiseConvAutoregressive
r"""Depthwise convolution for autoregressive models. Same implementation as mesh_tensorflow/ transformer/transformer.sublayer_depthwise_conv_
lingvo/core/gshard_builder.py:1749
↓ 10 callersMethodDifficultyLevels
Dictionary of difficulty level strings to int32 indices.
lingvo/tasks/car/kitti_metadata.py:33
↓ 10 callersMethodDistanceBinWidth
The width of each bin for Euclidean distance in world coordinates.
lingvo/tasks/car/kitti_metadata.py:63
↓ 10 callersMethodExtendStep
Computes the value vector given the query of the current step. This function is used by autoregressive decoding. Used for self-attention (hen
lingvo/core/batch_major_attention.py:4655
← previousnext →201–300 of 9,552, ranked by callers