pytomography.priors.prior
#
Module Contents#
Classes#
Abstract class for implementation of prior \(V(f)\). Any function inheriting from this class should implement a |
- class pytomography.priors.prior.Prior(beta, device='cpu')#
Bases:
torch.nn.Module
Abstract class for implementation of prior \(V(f)\). Any function inheriting from this class should implement a
foward
method that computes the tensor \(\frac{\partial V}{\partial f_r}\) where \(f\) is an object tensor.- Parameters:
beta (float) –
device (str) –
- set_object_meta(object_meta)#
Sets object metadata parameters.
- Parameters:
object_meta (ObjectMeta) – Object metadata describing the system.
- Return type:
None
- set_beta_scale(factor)#
Sets \(\beta\)
- Parameters:
factor (float) – Value of \(\beta\)
- Return type:
None
- set_object(object)#
Sets the object \(f_r\) used to compute :math:` rac{partial V}{partial f_r}`
- Args:
object (torch.tensor): Tensor of size [batch_size, Lx, Ly, Lz] which the prior will be computed on
- Parameters:
object (pytomography.metadata.ObjectMeta) –
- Return type:
None
- set_device(device='cpu')#
Sets the pytorch computation device
- Parameters:
device (str) – sets device.
- Return type:
None
- abstract forward()#
Abstract method to compute prior based on the
self.object
attribute.