ggt.utils.tensor_utils

Module Contents

Functions

tensor_to_numpy(x)

Convert a torch tensor to NumPy for plotting.

arsinh_normalize(X)

Normalize a Torch tensor with arsinh.

load_tensor(filename, tensors_path[, as_numpy])

Load a Torch tensor from disk.

standardize_labels(input, data_dir, split, slug, ...)

Standardizes data. During training, input should

metric_output_transform_al_loss(output)

Transforms the output of the model, when using

metric_output_transform_al_cov_loss(output)

Transforms the output of the model, when using

ggt.utils.tensor_utils.tensor_to_numpy(x)

Convert a torch tensor to NumPy for plotting.

ggt.utils.tensor_utils.arsinh_normalize(X)

Normalize a Torch tensor with arsinh.

ggt.utils.tensor_utils.load_tensor(filename, tensors_path, as_numpy=True)

Load a Torch tensor from disk.

ggt.utils.tensor_utils.standardize_labels(input, data_dir, split, slug, label_col, scaling, invert=False)

Standardizes data. During training, input should be the labels, and during inference, input should be the predictions.

ggt.utils.tensor_utils.metric_output_transform_al_loss(output)

Transforms the output of the model, when using aleatoric loss, to a form which can be used by the ignote metric calculators

ggt.utils.tensor_utils.metric_output_transform_al_cov_loss(output)

Transforms the output of the model, when using aleatoric covariance loss, to a form which can be used by the ignote metric calculators