Util
arg_to_set(x)
convert None to empty set, iterable to set, or scalar to set with one item
deep_update(a, b)
in-place update a with contents of b, recursively for nested Mapping objects.
gen_masks(n, dtype=torch.float)
yield the autoregressive mask matrices of all permuations of n items
Source code in src/notochord/util.py
gen_perms(a)
yield all permutations of the given list
get_class_defaults(cls)
get the default argument values of a class constructor