ggt.utils
Submodules
Package Contents
Functions
Check for available devices. |
|
Convert a torch tensor to NumPy for plotting. |
|
Normalize a Torch tensor with arsinh. |
|
|
Load a Torch tensor from disk. |
|
Standardizes data. During training, input should |
|
Transforms the output of the model, when using |
Transforms the output of the model, when using |
|
|
Loads and returns pandas dataframe |
|
Get output shape of a PyTorch model or layer |
|
Enable random dropout during inference. From StackOverflow #63397197 |
|
Specify the dropout rate of all layers |
- ggt.utils.discover_devices()
Check for available devices.
- ggt.utils.tensor_to_numpy(x)
Convert a torch tensor to NumPy for plotting.
- ggt.utils.arsinh_normalize(X)
Normalize a Torch tensor with arsinh.
- ggt.utils.load_tensor(filename, tensors_path, as_numpy=True)
Load a Torch tensor from disk.
- ggt.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.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.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
- ggt.utils.load_cat(data_dir, slug, split)
Loads and returns pandas dataframe
- ggt.utils.get_output_shape(model, image_dim)
Get output shape of a PyTorch model or layer
- ggt.utils.enable_dropout(model)
Enable random dropout during inference. From StackOverflow #63397197
- ggt.utils.specify_dropout_rate(model, rate)
Specify the dropout rate of all layers