utils#

Utilities

Classes

Time()

A decorator that records the running time of a function.

Functions

apply_complex_fix(fn, tensors_dict)

Apply the function to the tensors in the dictionary and convert the result to complex dtype.

record_time(func)

A decorator that records the running time of a function.

class Time[source]#

Bases: object

A decorator that records the running time of a function.

apply_complex_fix(fn: Any, tensors_dict: dict[str, Tensor]) dict[str, Tensor][source]#

Apply the function to the tensors in the dictionary and convert the result to complex dtype.

record_time(func: Callable) Callable[source]#

A decorator that records the running time of a function.