Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/google-deepmind/penzai
/ functions
Functions
1,092 in github.com/google-deepmind/penzai
⨍
Functions
1,092
◇
Types & classes
360
↳
Endpoints
3
Method
__call__
Calls the intercepted method with the given arguments and kwargs. Arguments: args_and_kwargs: The positional and keyword arguments passed t
penzai/deprecated/v1/toolshed/unflaxify.py:109
Method
__call__
Signature for a loss function. Args: model: The structure with parameters, usually a neural network model. state: Arbitrary state man
penzai/deprecated/v1/toolshed/basic_training.py:126
Method
__call__
Signature for a training step. Args: train_state: The current state. **kwargs: Arguments passed to the train step, usually inputs to
penzai/deprecated/v1/toolshed/basic_training.py:153
Method
__call__
(self, attn_weights: pz.nx.NamedArray)
penzai/deprecated/v1/toolshed/model_rewiring.py:54
Method
__call__
(self, inputs: pz.nx.NamedArray)
penzai/deprecated/v1/toolshed/model_rewiring.py:175
Method
__call__
(self, inputs)
penzai/deprecated/v1/toolshed/model_rewiring.py:201
Method
__call__
(self, tree: PyTreeOfArrays)
penzai/deprecated/v1/toolshed/sharding_util.py:91
Method
__call__
(self, tree: PyTreeOfNamedArrays)
penzai/deprecated/v1/toolshed/sharding_util.py:114
Method
__call__
(self, argument)
penzai/deprecated/v1/toolshed/isolate_submodel.py:66
Method
__call__
(self, value: Any, /)
penzai/deprecated/v1/toolshed/annotate_shapes.py:46
Method
__call__
Standardizes a named array across the given axes.
penzai/deprecated/v1/nn/standardization.py:52
Method
__call__
Root-mean-square standardizes a named array across the given axes.
penzai/deprecated/v1/nn/standardization.py:147
Method
__call__
Runs each of the sublayers in sequence. Args: value: The input to the layer. Returns: The output of the final sublayer.
penzai/deprecated/v1/nn/grouping.py:68
Method
__call__
Runs each of the sublayers in sequence. Args: value: The input to the layer. Returns: The output of the final sublayer.
penzai/deprecated/v1/nn/grouping.py:134
Method
__call__
Runs each of the sublayers in sequence. Args: value: The input to the layer. Returns: The output of the final sublayer.
penzai/deprecated/v1/nn/grouping.py:185
Method
__call__
Returns the input unchanged.
penzai/deprecated/v1/nn/grouping.py:223
Method
__call__
Checks the structure of the value, then returns it.
penzai/deprecated/v1/nn/grouping.py:244
Method
__call__
Randomly drops out components of the input.
penzai/deprecated/v1/nn/dropout.py:79
Method
__call__
Runs each of the sublayers in sequence, then adds the original input. Args: value: The input to the block. Returns: The sum of t
penzai/deprecated/v1/nn/combinators.py:50
Method
__call__
(self, arg)
penzai/deprecated/v1/nn/combinators.py:79
Method
__call__
(self, arg)
penzai/deprecated/v1/nn/combinators.py:110
Method
__call__
( self, value: jax.Array | named_axes.NamedArrayBase )
penzai/deprecated/v1/nn/basic_ops.py:53
Method
__call__
( self, inputs: named_axes.NamedArrayBase )
penzai/deprecated/v1/nn/basic_ops.py:89
Method
__call__
(self, inputs: Any)
penzai/deprecated/v1/nn/basic_ops.py:110
Method
__call__
Applies the attention mask to the input array. Args: x: The input array to mask. Usually the matrix of query-key dot products. Returns
penzai/deprecated/v1/nn/attention.py:80
Method
__call__
Runs the attention computation. Args: x: The input to the computation, which will be mapped to queries, keys, and values by the sub
penzai/deprecated/v1/nn/attention.py:119
Method
__call__
Runs the caching attention computation and update the K/V cache state. When called, ``self.kv_cache_end_index`` should be filled with a scala
penzai/deprecated/v1/nn/attention.py:186
Method
__call__
Retrieves tokens from the embedding table. Args: token_index: A named array of token indices. Axis names of this array must be disj
penzai/deprecated/v1/nn/embeddings.py:142
Method
__call__
Retrieves tokens from the embedding table. Args: out_embeddings: The output embeddings that should be mapped to token logits. Shoul
penzai/deprecated/v1/nn/embeddings.py:193
Method
__call__
(self, inputs: named_axes.NamedArray)
penzai/deprecated/v1/nn/embeddings.py:312
Method
__call__
Signature for a generalized linear operator `NamedArray` initializer. This signature attempts to make explicit all of the dimensions used by an
penzai/deprecated/v1/nn/linear_and_affine.py:48
Method
__call__
(self, value: NamedArray)
penzai/deprecated/v1/nn/linear_and_affine.py:235
Method
__call__
Runs the einsum operation.
penzai/deprecated/v1/nn/linear_and_affine.py:352
Method
__call__
Runs the linear operator.
penzai/deprecated/v1/nn/linear_and_affine.py:448
Method
__call__
Adds a learned bias to the value.
penzai/deprecated/v1/nn/linear_and_affine.py:651
Method
__call__
Scales its input by the scaling factor.
penzai/deprecated/v1/nn/linear_and_affine.py:796
Method
__call__
(self, x, **_unused_side_inputs)
tests/toolshed/isolate_submodel_test.py:55
Method
__call__
(self, x)
tests/toolshed/unflaxify_test.py:32
Method
__call__
(self, x)
tests/toolshed/unflaxify_test.py:58
Method
__call__
(self, x)
tests/toolshed/unflaxify_test.py:69
Method
__call__
(self, x)
tests/toolshed/unflaxify_test.py:91
Method
__call__
(self, x)
tests/toolshed/unflaxify_test.py:106
Method
__call__
(self, x)
tests/toolshed/unflaxify_test.py:156
Method
__call__
(self, x)
tests/toolshed/unflaxify_test.py:166
Method
__call__
(self, x, **_unused_side_inputs)
tests/toolshed/jit_wrapper_test.py:33
Method
__call__
(self, x, **_unused_side_inputs)
tests/toolshed/gradient_checkpointing_test.py:33
Method
__call__
(self, x, scale, **_side_inputs)
tests/nn/layer_test.py:28
Method
__call__
(self, x, scale, **_side_inputs)
tests/nn/layer_test.py:36
Method
__call__
(self, arg, /, shared_counter, **side_inputs)
tests/nn/layer_stack_test.py:32
Method
__call__
(self, argument)
tests/deprecated/v1/shapecheck_layer_test.py:32
Method
__call__
(self, argument: Any, /)
tests/deprecated/v1/data_effects/side_output_test.py:34
Method
__call__
(self, argument: Any, /)
tests/deprecated/v1/data_effects/local_state_test.py:53
Method
__call__
(self, argument: Any, /)
tests/deprecated/v1/data_effects/local_state_test.py:82
Method
__call__
(self, argument: Any, /)
tests/deprecated/v1/data_effects/random_test.py:31
Method
__call__
(self, argument: Any, /)
tests/deprecated/v1/data_effects/side_input_test.py:34
Method
__call__
(self, x)
tests/deprecated/v1/toolshed/isolate_submodel_test.py:54
Method
__call__
(self, x)
tests/deprecated/v1/toolshed/unflaxify_test.py:32
Method
__call__
(self, x)
tests/deprecated/v1/toolshed/unflaxify_test.py:59
Method
__call__
(self, x)
tests/deprecated/v1/toolshed/unflaxify_test.py:70
Method
__call__
(self, x)
tests/deprecated/v1/toolshed/unflaxify_test.py:93
Method
__call__
(self, x)
tests/deprecated/v1/toolshed/unflaxify_test.py:108
Method
__call__
(self, value)
tests/deprecated/v1/nn/parameters_test.py:46
Method
__call__
(self, value: int)
tests/treescope/fixtures/treescope_examples_fixture.py:34
Method
__call__
(self, value: int)
tests/treescope/fixtures/treescope_examples_fixture.py:49
Method
__enter__
Activates the random stream in a context.
penzai/deprecated/v1/core/random_stream.py:88
Method
__exit__
Deactivates the random stream.
penzai/deprecated/v1/core/random_stream.py:92
Method
__ge__
(self, other)
penzai/core/auto_order_types.py:113
Method
__getattr__
(self, key: str)
penzai/core/shapecheck.py:492
Method
__getattr__
Retrieves and wraps an attribute of the underlying module. Args: name: The attribute name to retrieve. Returns: Either an AutoNm
penzai/toolshed/auto_nmap.py:71
Method
__getattr__
Fallback to get a missing method from an ``EffectRequest``.
penzai/deprecated/v1/data_effects/effect_base.py:159
Method
__getattr__
Fallback to get a missing method from an HandledEffectRef.
penzai/deprecated/v1/data_effects/effect_base.py:363
Method
__getitem__
(self, index)
penzai/core/named_axes.py:481
Method
__getitem__
Retrieves slices from an indexer. `NamedArray` and `NamedArrayView` can be indexed in two different ways, depending on whether the axes you w
penzai/core/named_axes.py:1022
Method
__getitem__
(self, indexer)
penzai/core/syntactic_sugar.py:29
Method
__getitem__
(self, key)
penzai/core/shapecheck.py:106
Method
__getitem__
(self, key_or_keys: str | tuple[str, ...])
penzai/core/shapecheck.py:486
Method
__gt__
(self, other)
penzai/core/auto_order_types.py:97
Method
__init__
Constructs a new variable. Args: label: The unique label for this variable. value: The initial value of the variable. metadata:
penzai/core/variables.py:494
Method
__init__
Constructs a new state variable. Args: value: The initial value of the variable. label: The unique label for this variable. If not pr
penzai/core/variables.py:731
Method
__init__
Constructs an uninitialized parameter. Args: initializer: Initializer to use. name: Name to use. value_structure: If provided,
penzai/deprecated/v1/nn/parameters.py:248
Method
__init__
(self, init_arg: int)
tests/core/struct_pytree_dataclass_test.py:204
Method
__init__
(self, init_arg: int)
tests/core/struct_pytree_dataclass_test.py:246
Method
__init__
(self, init_arg: int)
tests/core/struct_pytree_dataclass_test.py:269
Method
__init__
(self, new_init_arg: int)
tests/core/struct_pytree_dataclass_test.py:317
Method
__init__
(self, init_arg: int)
tests/core/struct_pytree_dataclass_test.py:429
Method
__init_subclass__
Checks that new subclasses of Layer have wrapped ``__call__`` if needed.
penzai/deprecated/v1/core/layer.py:204
Method
__iter__
(self)
penzai/core/named_axes.py:1213
Method
__iter__
(self)
penzai/core/shapecheck.py:101
Method
__iter__
(self)
penzai/core/shapecheck.py:483
Method
__le__
(self, other)
penzai/core/auto_order_types.py:105
Method
__len__
Returns the number of elements in the selection.
penzai/core/selectors.py:204
Method
__len__
(self)
penzai/core/shapecheck.py:98
Method
__len__
(self)
penzai/core/shapecheck.py:480
Method
__lt__
(self, other)
penzai/core/auto_order_types.py:89
Method
__repr__
Renders this object with treescope, on a single line.
penzai/core/struct.py:690
Method
__repr__
(self)
penzai/core/variables.py:541
Method
__str__
(self)
penzai/core/tree_util.py:33
Method
__treescope_ndarray_adapter__
Treescope handler for named arrays.
penzai/core/named_axes.py:1226
Method
__treescope_repr__
(self, path: str | None, subtree_renderer: Any)
penzai/core/struct.py:710
Method
__treescope_repr__
Treescope handler for named arrays.
penzai/core/named_axes.py:1220
← previous
next →
301–400 of 1,092, ranked by callers