SplitRandomSeed¶
Manually split a random seed into an array of multiple derived seeds.
The resulting array is of size (num,N) where N is implementation specific and depends on the type of seed. One way this can be used is to split off a key for each successive random operation one wants to perform, where one generates two keys from the initial seed -- one as the next seed (for future splitting) and one as the key for the current operation. The other way is to pre-generate a number of keys for use in multiple operations. The schemes can also be mixed, where one splits as many keys as needed to pass into various functions, and each function further splits keys to drive its random operations. The initial seed must have been generated using the Create Random Seed node. This node outputs the split key as an array of size (num,N) under the output key. However, for convenience, it also provides outputs named main_key and subkey1, subkey2, etc. which correspond to the zero'th and first through num'th elements of the key array, each of which represents a single key. Note there is technically no distinction between a "main" key and "sub"keys, but the naming suggests the use of the main key for subsequent splitting within the same function, and the subkey(s) for passing down into some random operation(s). Version 0.5.0
Ports/Properties¶
key¶
Splittable random seed.
main_key¶
Updated main key.
subkey1¶
Subkey 1.
subkey2¶
Subkey 2.
subkey3¶
Subkey 3.
subkey4¶
Subkey 4.
subkey5¶
Subkey 5.
subkey6¶
Subkey 6.
subkey7¶
Subkey 7.
subkey8¶
Subkey 8.
subkey9¶
Subkey 9.
num¶
Number of random seeds to generate.
algorithm¶
Random number generation algorithm for which to generate a seed. The default depends on the chosen backend, and not all backends support all algorithms. For this reason it is recommended to use the default.
backend¶
Optional compute backend for which to generate the seed. Keep is the current default, which is typically numpy, but which can be overridden in contexts that require it. Some backends (notably jax and tensorflow) require that the seed be generated using the same backend as the downstream random operation. For this reason, it is a good idea to use the same backend for both the seed management and the random operation to future-proof one's pipeline.
set_breakpoint¶
Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.
metadata¶
User-definable meta-data associated with the node. Usually reserved for technical purposes.