utils#

Classes

AddTensors

Adds all its inputs together.

MinMaxNormalize

Albumentations transform that normalizes image to desired min and max values.

ONNXRuntimeAdapter

Wrapper around ONNX-runtime that behaves like a PyTorch nn.Module.

Parallel

Passes inputs through multiple `nn.Module`s in parallel. Returns a tuple of outputs.

SplitTensor

Wrapper around torch.split

Functions

adjust_conv_channels(old_conv, in_channels)

aggregate_metrics(outputs[, exclude_keys])

Aggregate the output of validate_step at the end of the epoch.

channel_groups_to_imgs(x, channel_groups)

compute_conf_mat(out, y, num_labels)

compute_conf_mat_metrics(conf_mat, label_names)

deserialize_albumentation_transform(tf_dict)

Deserialize an albumentations transform serialized by serialize_albumentation_transform().

get_learner_config_from_bundle_dir(...)

log_metrics_to_csv(csv_path, metrics)

Append epoch metrics to CSV file.

log_system_details()

Log some system details.

plot_channel_groups(axs, imgs, channel_groups)

serialize_albumentation_transform(tf[, ...])

Serialize an albumentations transform to a dict.

validate_albumentation_transform(tf_dict)

Validate a serialized albumentation transform by attempting to deserialize it.