Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/tensorflow/lingvo
/ functions
Functions
9,552 in github.com/tensorflow/lingvo
⨍
Functions
9,552
◇
Types & classes
1,444
↳
Endpoints
48
↓ 2,951 callers
Method
Define
Defines a parameter. Args: name: The parameter name. Must only contain lowercase letters, numbers, and underscores. Must start with
lingvo/core/hyperparams.py:377
↓ 1,411 callers
Method
session
Test session context manager.
lingvo/core/test_utils.py:318
↓ 1,229 callers
Method
Set
(self, value)
lingvo/core/hyperparams.py:184
↓ 1,096 callers
Method
Params
(cls)
lingvo/core/step.py:50
↓ 1,049 callers
Method
Instantiate
(p)
lingvo/core/base_layer.py:1032
↓ 876 callers
Method
run
Evaluates `function_or_fetches` with `feed_dict` as input. Args: function_or_fetches: Eager tensors, or functions decorated by @Def
lingvo/core/test_utils.py:218
↓ 562 callers
Method
FPropDefaultTheta
Calls `FProp` with this layer's parameters.
lingvo/core/base_model.py:564
↓ 434 callers
Method
CreateChild
Create a sub layer. The created sub layer can be accessed by `name`. E.g.:: self.CreateChild('foo', foo_params) self.foo.FProp..
lingvo/core/base_layer.py:974
↓ 418 callers
Method
Copy
Creates a deep copy of self.
lingvo/core/hyperparams.py:357
↓ 253 callers
Method
CreateVariable
Create a variable of this layer according to the parameter `var_params`. E.g.:: def __init__(self, ...): # A layer's constructor
lingvo/core/base_layer.py:823
↓ 235 callers
Method
size
Returns the size (num of elements) of the tensor.
lingvo/core/tshape.py:57
↓ 206 callers
Method
split
(self, sep)
lingvo/core/inspect_utils_test.py:167
↓ 203 callers
Method
FProp
Forward function. step_inputs, state0, step_outputs, and state1 should each be a `.NestedMap` of tensor values. Each tensor must be of shape
lingvo/core/step.py:119
↓ 179 callers
Method
Gaussian
scale * tf.random.normal(0, 1.0).
lingvo/core/py_utils.py:1101
↓ 177 callers
Method
Flatten
Returns a list containing the flattened values in the `.NestedMap`. Unlike py_utils.Flatten(), this will only descend into lists, dicts, and
lingvo/core/nested_map.py:443
↓ 166 callers
Method
Value
(self, step=None)
lingvo/core/schedule.py:63
↓ 164 callers
Method
Params
(cls)
lingvo/core/batch_major_attention_test.py:6764
↓ 164 callers
Method
Transform
Returns a copy of this `.NestedMap` with fn applied on each value.
lingvo/core/nested_map.py:470
↓ 158 callers
Method
Constant
scale.
lingvo/core/py_utils.py:1140
↓ 125 callers
Method
Uniform
scale * tf.random.uniform(-1.0, 1.0).
lingvo/core/py_utils.py:1106
↓ 118 callers
Method
FProp
Applies stride to the inputs. Args: theta: weights defined in this layer. x: input tensor, [..., time, ...]. Stride is applied to the
lingvo/core/batch_major_attention.py:8112
↓ 118 callers
Method
_Fn
(x, y)
lingvo/core/gshard_builder.py:2377
↓ 115 callers
Method
assign
(self, value, use_locking=False, name=None, read_value=True)
lingvo/core/var_tmp_wrappers.py:63
↓ 112 callers
Method
Params
(cls)
lingvo/core/batch_major_attention.py:8595
↓ 108 callers
Method
Xavier
Xavier initialization (x = sqrt(6. / (in + out)); [-x, x]).
lingvo/core/py_utils.py:1121
↓ 94 callers
Method
FProp
Look up style embedding.
lingvo/core/layers_with_attention.py:2176
↓ 91 callers
Method
gather
Gathers values from v. Args: v: A tensor of shape [B, T, N, D] indx: A tensor of shape [B, N, K, W] Returns: A v
lingvo/core/batch_major_attention.py:4948
↓ 89 callers
Method
Params
(cls)
lingvo/core/datasource_test.py:127
↓ 88 callers
Method
Params
(cls)
lingvo/tasks/mt/model.py:204
↓ 83 callers
Method
Params
Params for the Scones output layer.
lingvo/core/layers.py:4225
↓ 78 callers
Method
Params
(cls)
lingvo/tasks/car/params/kitti.py:86
↓ 77 callers
Method
Add
lingvo/core/ops/text_packing.cc:42
↓ 74 callers
Method
SetEval
(self, mode)
lingvo/core/test_utils.py:324
↓ 72 callers
Method
FProp
Encodes source as represented by `inputs` and `paddings`. Args: theta: A `.NestedMap` object containing weights' values of this layer and
lingvo/tasks/mt/encoder.py:144
↓ 72 callers
Method
_Seq
(self, name, *subs)
lingvo/tasks/car/builder_lib.py:71
↓ 71 callers
Method
Get
(self)
lingvo/core/hyperparams.py:190
↓ 71 callers
Method
Params
(cls)
lingvo/core/layers_with_attention.py:2092
↓ 71 callers
Method
get_slot
(self, *args, **kwargs)
lingvo/core/optimizer.py:1369
↓ 70 callers
Method
AddVN
(self, value, per_step=False, channel_reverse=False)
lingvo/core/base_layer.py:934
↓ 68 callers
Method
EmbLookup
Looks up embedding vectors for ids. Args: theta: Named tuple with the weight matrix for the embedding. ids: A rank-N int32 tensor.
lingvo/core/layers.py:2656
↓ 66 callers
Method
_Graph
Connects sub-layers into a data flow graph.
lingvo/core/builder.py:134
↓ 64 callers
Method
GetTask
Return the task associated with 'task_name'. Args: task_name: string, the name of the model task to be returned. Returns: An ins
lingvo/core/base_model.py:1280
↓ 63 callers
Method
CreateChildren
Create a list or dict of sub layers. The created sub layer list can be accessed by `name`. E.g.:: self.CreateChildren('foo', ...)
lingvo/core/base_layer.py:1005
↓ 62 callers
Method
CompareToGoldenSingleFloat
(self, unused_v1, v2)
lingvo/core/test_utils_test.py:39
↓ 61 callers
Method
MeshSplit
(self, name, tensor_split_dims_mapping)
lingvo/core/gshard_builder.py:2461
↓ 59 callers
Method
FlattenItems
Flatten the `.NestedMap` and returns <key, value> pairs in a list. Returns: A list of <key, value> pairs, where keys for nested entries wil
lingvo/core/nested_map.py:451
↓ 55 callers
Method
Pack
Returns a copy of this with each value replaced by a value in lst.
lingvo/core/nested_map.py:460
↓ 53 callers
Method
DeepCopy
Deep-copies the structure but not the leaf objects.
lingvo/core/nested_map.py:163
↓ 52 callers
Method
_HasFile
(self, files, substr)
lingvo/trainer_test.py:92
↓ 49 callers
Method
_Seq
Connects sub-layers sequentially.
lingvo/core/builder.py:129
↓ 48 callers
Method
Params
(cls, num_classes, num_anchor_bboxes_per_center, num_laser_features=1)
lingvo/tasks/car/starnet.py:530
↓ 48 callers
Method
Params
(cls)
lingvo/tasks/lm/layers.py:499
↓ 48 callers
Method
Shape
(self)
lingvo/tasks/car/input_extractor_test.py:36
↓ 47 callers
Method
CheckShapes
lingvo/tasks/car/ops/nms_3d_op.cc:45
↓ 47 callers
Method
GetNext
lingvo/core/ops/record_batcher.cc:270
↓ 47 callers
Method
GetParams
Constructs a `Params` object for given model and dataset, obeying flags. In case of default model, params may be updated based on the flags `
lingvo/model_registry.py:300
↓ 46 callers
Method
Current
Returns current context or None.
lingvo/core/py_utils.py:6582
↓ 46 callers
Method
DebugString
lingvo/core/ops/input_common.h:165
↓ 46 callers
Method
InitForSourcePacked
A wrapper of InitForSourcePacked of child attention layer. Args: theta: A `.NestedMap` object containing weights' values of this la
lingvo/core/rnn_layers.py:812
↓ 46 callers
Method
Params
(cls)
lingvo/core/base_model_test.py:227
↓ 46 callers
Method
Params
Configs for TransformerStack.
lingvo/core/layers_with_gpipe.py:169
↓ 46 callers
Method
Transform
Transform the points in bounding box `i`.
lingvo/tasks/car/input_preprocessors.py:2497
↓ 45 callers
Method
__init__
(self, params)
lingvo/core/layers.py:6146
↓ 44 callers
Method
Params
(cls)
lingvo/core/schedule.py:58
↓ 43 callers
Method
Update
Updates the metrics. Args: label: An array to specify the groundtruth binary labels. Values must be either 0 or 1. prob: An a
lingvo/core/metrics.py:493
↓ 42 callers
Method
Params
(cls)
lingvo/tasks/car/input_preprocessors.py:3531
↓ 41 callers
Method
Flatten
Reshapes `tensors`, collapsing the leading `batch_shape` to one dim. The shapes of all `tensors` must begin with `batch_shape`. Args:
lingvo/tasks/milan/utils.py:193
↓ 41 callers
Method
_DecoderParams
( self, per_word_avg_loss=False, dtype=tf.float32, fprop_dtype=None, decoder_cls
lingvo/tasks/mt/decoder_test.py:71
↓ 39 callers
Method
_CastToFPropDtype
(self, value)
lingvo/core/base_layer.py:1154
↓ 38 callers
Method
ToText
(self, include_types: Literal[False] = False, separator: str = ':')
lingvo/core/hyperparams.py:773
↓ 38 callers
Method
copy
(self: NestedMapT)
lingvo/core/nested_map.py:155
↓ 37 callers
Method
ComputeContextVector
Computes the context vector given the current query output. Unlike `ComputeContextVectorWithSource` which explicitly asks for the packed sour
lingvo/core/attention.py:341
↓ 37 callers
Method
Params
(cls, *args, **kwargs)
lingvo/tasks/car/kitti_input_generator.py:482
↓ 37 callers
Method
QAct
Quantizes an activation. act_name must have been previously created via TrackQActs. Args: act_name: Previously created act_name to qua
lingvo/core/quant_utils.py:270
↓ 37 callers
Method
Split
Sets sharding attribute for the Tensor. Split across dim=0.
lingvo/core/gshard_builder.py:1956
↓ 35 callers
Method
Get
lingvo/tasks/car/ops/ps_utils.cc:224
↓ 35 callers
Method
Yield
lingvo/core/ops/record_yielder.cc:450
↓ 34 callers
Function
GetShape
Returns tensor's shape as a list which can be unpacked, unlike tf.shape. If the tensor is unranked, and ndims is None, returns the shape as a Tenso
lingvo/core/py_utils.py:433
↓ 34 callers
Method
GetValue
(params_or_dict: Union[Params, Dict[str, Any]], key: str)
lingvo/core/hyperparams.py:1096
↓ 34 callers
Method
assign_add
(self, delta, use_locking=False, name=None, read_value=True)
lingvo/core/var_tmp_wrappers.py:68
↓ 33 callers
Method
DebugString
lingvo/tasks/car/ops/ps_utils.cc:456
↓ 33 callers
Method
Params
(cls)
lingvo/core/rnn_layers.py:73
↓ 30 callers
Method
SetInputGenerator
Initialize this datasource. Args: input_generator: A reference to the external input_generator.
lingvo/core/datasource.py:49
↓ 29 callers
Method
FProp
(self, theta, inputs, paddings)
lingvo/core/layers.py:6187
↓ 29 callers
Method
QWeight
Quantizes a weight. Args: w: The weight tensor. domain: Name of the QDomain to use for quantization. Returns: The weights q
lingvo/core/quant_utils.py:294
↓ 29 callers
Method
_testTransformerAttentionLayerInputs
(self, depth=3, context_
lingvo/core/layers_with_attention_test.py:492
↓ 28 callers
Method
FProp
(self, theta, source_vecs, source_paddings, target_vecs,
lingvo/core/layers_with_gpipe.py:192
↓ 28 callers
Method
GetPreprocessedInputBatch
(self)
lingvo/tasks/milan/input_generator.py:88
↓ 28 callers
Method
Params
Defaults params for input generators.
lingvo/core/base_input_generator.py:180
↓ 27 callers
Method
ClassNames
Returns a list of human-interpretable strings.
lingvo/tasks/car/kitti_metadata.py:26
↓ 27 callers
Method
ExtendStep
Generates a JTensor of sinusoids with different frequencies for a step. Args: theta: A `.NestedMap` object containing weights' values of th
lingvo/core/layers.py:3528
↓ 27 callers
Method
FProp
Computes xent loss given the language model input activations. Args: theta: A `.NestedMap` object containing weights' values of this layer
lingvo/tasks/lm/layers.py:610
↓ 27 callers
Method
Params
(cls)
lingvo/tasks/mt/model_test.py:42
↓ 26 callers
Method
IterParams
Pythonic dict-like iteration.
lingvo/core/hyperparams.py:521
↓ 26 callers
Method
Sample
(self, current_step)
lingvo/core/task_scheduler.py:43
↓ 26 callers
Function
_Dense
(sparse, default_value=0)
lingvo/tasks/car/waymo/waymo_open_input_generator.py:33
↓ 26 callers
Method
_GetValue
Expects a NestedMap as input and produces the value for the given key.
lingvo/tasks/car/builder_lib.py:587
↓ 26 callers
Method
_Params
Parameters of this class.
lingvo/core/py_utils.py:1089
↓ 26 callers
Method
_TransformerAttentionLayerInputs
(self, input_dim=4, dtype=tf.float32)
lingvo/core/batch_major_attention_test.py:4027
↓ 26 callers
Method
current_epoch
Returns the current epoch number. Epoch number starts from 1 and reflects the epoch number of the record returned by the next Yield() call.
lingvo/core/ops/record_yielder.h:236
next →
1–100 of 9,552, ranked by callers