spine.model.singlep
Image classification module.
- This module includes:
Single full image classification
Individual cluster classification
UQ implementations of the full image classification
Classes
|
|
|
Uncertainty Estimation Using a Single Deep Deterministic Neural Network https://arxiv.org/pdf/2003.02037.pdf Joost van Amersfoort, Lewis Smith, Yee Whye Teh, Yarin Gal. |
|
|
|
|
|
|
|
|
|
- class spine.model.singlep.MultiParticleImageClassifier(*args: Any, **kwargs: Any)[source]
Methods
__call__(*args, **kwargs)Call self as a function.
forward(input[, clusts])Run a batch of data through the forward function.
process_model_config(num_classes, **encoder)Initialize the underlying encoder and the final layer.
split_input
split_input_as_tg_batch
- MODULES = ['particle_image_classifier', 'network_base', 'mink_encoder']
- forward(input, clusts=None)[source]
Run a batch of data through the forward function.
- Parameters:
data (TensorBatch) – (N, 1 + D + N_f) tensor of voxel/value pairs - N is the the total number of voxels in the image - 1 is the batch ID - D is the number of dimensions in the input image - N_f is the number of features per voxel
- class spine.model.singlep.DUQParticleClassifier(*args: Any, **kwargs: Any)[source]
Uncertainty Estimation Using a Single Deep Deterministic Neural Network https://arxiv.org/pdf/2003.02037.pdf Joost van Amersfoort, Lewis Smith, Yee Whye Teh, Yarin Gal.
Pytorch Implementation for SparseConvNets with MinkowskiEngine backend.
Methods
__call__(*args, **kwargs)Call self as a function.
forward(input)Run a batch of data through the forward function.
process_model_config(num_classes, **encoder)Initialize the underlying encoder and the final layer.
bilinear
embed
update_buffers
- MODULES = ['network_base', 'particle_image_classifier', 'mink_encoder']
- forward(input)[source]
Run a batch of data through the forward function.
- Parameters:
data (TensorBatch) – (N, 1 + D + N_f) tensor of voxel/value pairs - N is the the total number of voxels in the image - 1 is the batch ID - D is the number of dimensions in the input image - N_f is the number of features per voxel
- class spine.model.singlep.EvidentialParticleClassifier(*args: Any, **kwargs: Any)[source]
Methods
__call__(*args, **kwargs)Call self as a function.
forward(input)Run a batch of data through the forward function.
process_model_config(num_classes, **encoder)Initialize the underlying encoder and the final layer.
- MODULES = ['network_base', 'particle_image_classifier', 'mink_encoder']
- forward(input)[source]
Run a batch of data through the forward function.
- Parameters:
data (TensorBatch) – (N, 1 + D + N_f) tensor of voxel/value pairs - N is the the total number of voxels in the image - 1 is the batch ID - D is the number of dimensions in the input image - N_f is the number of features per voxel
- class spine.model.singlep.BayesianParticleClassifier(*args: Any, **kwargs: Any)[source]
Methods
__call__(*args, **kwargs)Call self as a function.
evidential_forward
forward
mc_forward
standard_forward
- MODULES = ['network_base', 'mcdropout_encoder']
- class spine.model.singlep.MultiParticleTypeLoss(*args: Any, **kwargs: Any)[source]
Methods
__call__(*args, **kwargs)Call self as a function.
forward
forward_tg
- class spine.model.singlep.MultiLabelCrossEntropy(*args: Any, **kwargs: Any)[source]
Methods
__call__(*args, **kwargs)Call self as a function.
calc_gradient_penalty(x, y_pred)Code From the DUQ main Github Repository: https://github.com/y0ast/deterministic-uncertainty-quantification
forward
- static calc_gradient_penalty(x, y_pred)[source]
Code From the DUQ main Github Repository: https://github.com/y0ast/deterministic-uncertainty-quantification
Author: Joost van Amersfoort