RECODE-H / annotations /annotation_22 /function_info.json
mcy98's picture
Upload folder using huggingface_hub
2d13eb2 verified
Raw History Blame Contribute Delete
5.76 kB
[
{
"function_name": "__call__",
"file_path": "unf_core.py",
"function_calls": [
{
"function_call_name": "tree_flatten",
"functionality": "Flattens a JAX pytree into a list of leaves and a treedef.",
"input": "jtu.tree_map(LeafTuple, params, perm_spec)",
"output": "Tuple containing list of leaves and treedef.",
"location_or_namespace": "jax.tree_util"
},
{
"function_call_name": "tree_map",
"functionality": "Applies a function element-wise to the leaves of one or more pytrees.",
"input": "LeafTuple, params, perm_spec",
"output": "A pytree with LeafTuple instances at the leaves.",
"location_or_namespace": "jax.tree_util"
},
{
"function_call_name": "LeafTuple",
"functionality": "Helper function/class to pair a parameter tensor with its permutation specification.",
"input": "Individual parameter leaf, individual permutation specification leaf.",
"output": "A tuple (parameter_leaf, spec_leaf).",
"location_or_namespace": "algorithm.py"
},
{
"function_call_name": "partial",
"functionality": "Returns a new partial object which when called will behave like func called with the positional arguments args and keyword arguments keywords.",
"input": "gen_basis, out_spec, in_spec, out_param.shape",
"output": "A new partial function object.",
"location_or_namespace": "functools"
},
{
"function_call_name": "gen_basis",
"functionality": "Implements Algorithm 1 from the paper to generate basis functions for the equivariant map between two tensors with given permutation specifications.",
"input": "out_spec (tuple of int), in_spec (tuple of int), out_param.shape (tuple of int)",
"output": "A representation that allows computation of basis functions (e.g., a function or list of functions).",
"location_or_namespace": "algorithm.py"
},
{
"function_call_name": "vmap",
"functionality": "Vectorizes a function over specified axes.",
"input": "functools.partial(gen_basis, out_spec, in_spec, out_param.shape), in_axes=-1, out_axes=-1",
"output": "A vectorized function.",
"location_or_namespace": "jax"
},
{
"function_call_name": "vmapped_gen_basis",
"functionality": "Applies the vectorized basis generation function to the input parameter tensor.",
"input": "in_param (JAX tensor)",
"output": "Tensor representing the basis terms for the (i, j) pair, potentially batched over input channels.",
"location_or_namespace": "algorithm.py (via jax.vmap)"
},
{
"function_call_name": "param",
"functionality": "Registers and retrieves a learnable parameter within the Flax module.",
"input": "Name (string), Initializer function, Shape (tuple of int). E.g., f\"theta_{i}\", build_init_fn(scale, shape), shape.",
"output": "A JAX parameter tensor.",
"location_or_namespace": "flax.linen.Module"
},
{
"function_call_name": "build_init_fn",
"functionality": "Helper function defined in the module to create a scaled random normal initialization function.",
"input": "scale (float), shape (tuple of int)",
"output": "An initialization function (lambda).",
"location_or_namespace": "unf_core.py"
},
{
"function_call_name": "sqrt",
"functionality": "Calculates the square root of a number.",
"input": "1 / fan_in",
"output": "The square root (float).",
"location_or_namespace": "math"
},
{
"function_call_name": "zeros_init",
"functionality": "Provides a Flax initializer that sets parameters to zero.",
"input": "None",
"output": "An initialization function.",
"location_or_namespace": "flax.linen.initializers"
},
{
"function_call_name": "tree_unflatten",
"functionality": "Unflattens a list of leaves back into a pytree structure using a treedef.",
"input": "tree_def (JAX treedef), outs (List of JAX tensors)",
"output": "A JAX pytree with the same structure as the original input 'params'.",
"location_or_namespace": "jax.tree_util"
}
]
},
{
"function_name": "__call__",
"file_path": "unf_core.py",
"function_calls": [
{
"function_call_name": "isinstance",
"functionality": "Checks if an object is an instance of a class or a tuple of classes.",
"input": "layer, (UNFLayer, type(BatchUNFLayer))",
"output": "Boolean (True or False).",
"location_or_namespace": "builtins"
},
{
"function_call_name": "type",
"functionality": "Returns the type of an object.",
"input": "BatchUNFLayer",
"output": "The type object for BatchUNFLayer.",
"location_or_namespace": "builtins"
},
{
"function_call_name": "layer.__call__",
"functionality": "Applies the transformation defined by the specific layer instance. This is a dynamic call.",
"input": "Depends on layer type: (out, spec) for UNFLayer/BatchUNFLayer, (out) for others like nf_relu.",
"output": "Transformed parameters (pytree).",
"location_or_namespace": "Internal (either UNFLayer, BatchUNFLayer, or other layer type's definition in this or related files)."
}
]
}
]