utils#

Functions

batch

create_directory

f7

Source: https://stackoverflow.com/a/480227/1493011

file_tqdm

flatten

groupby_first_item

grouper

Collect data into fixed-length chunks or blocks

int_or_float

lengths2offsets

load_batch_backgrounds

load_checkpoint

load_checkpoint_raw

load_ranking

print_message

print_torch_extension_error_message

process_grouped_by_first_item

Requires items in list to already be grouped by first item.

remove_first_and_last_quote

save_checkpoint

save_ranking

timestamp

torch_load_dnn

zip_first

zipstar

A much faster A, B, C = zip(*[(a, b, c), (a, b, c), ...]) May return lists or tuples.

Classes

NullContextManager

dotdict

dot.notation access to dictionary attributes Credit: derek73 @ https://stackoverflow.com/questions/2352181

dotdict_lax