AD phase reconstruction
Automatic differentiation (AD) based methods of phase reconstruction.
AD phase reconstruction
Deep image prior model
- class PyLorentz.phase.DIP_NN.DIP_NN(*args: Any, **kwargs: Any)[source]
Bases:
ModuleAutoencoder for reconstructing object wave and amplitude of LTEM images.
- Parameters:
num_images – int, number of input channels, equal to number of images in TFS.
nb_filters – int, number of filters in the first convolutional block.
use_dropout – bool, whether to use dropout in the inner layers.
batch_norm – bool, whether to use batch normalization after each convolutional layer.
upsampling_mode – str, “bilinear” or “nearest” upsampling method.
- class PyLorentz.phase.DIP_NN.conv2dblock(*args: Any, **kwargs: Any)[source]
Bases:
ModuleA block consisting of convolutional layers with optional batch normalization and dropout.
- Parameters:
nb_layers – int, number of convolutional layers.
input_channels – int, number of input channels.
output_channels – int, number of output channels.
kernel_size – int, size of the convolutional kernel.
stride – int, stride of the convolution.
padding – int, padding for the convolution.
use_batchnorm – bool, whether to use batch normalization.
lrelu_a – float, negative slope for the Leaky ReLU activation.
dropout – float, dropout rate.
last_sigmoid – bool, whether to use a sigmoid activation on the last layer.
last_tanh – bool, whether to use a tanh activation on the last layer.
last_skipReLU – bool, whether to skip ReLU activation on the last layer.
- class PyLorentz.phase.DIP_NN.upsample_block(*args: Any, **kwargs: Any)[source]
Bases:
ModuleUpsampling block using interpolation followed by a convolution.
- Parameters:
input_channels – int, number of input channels.
output_channels – int, number of output channels.
scale_factor – int, factor by which to scale the input.
mode – str, interpolation mode, either “bilinear” or “nearest”.