niftynet.layer.linear_resize module

class LinearResizeLayer(new_size, name='trilinear_resize')[source]

Bases: niftynet.layer.base_layer.Layer

Resize 2D/3D images using tf.image.resize_bilinear (without trainable parameters).

__init__(new_size, name='trilinear_resize')[source]
  • new_size – integer or a list of integers set the output 2D/3D spatial shape. If the parameter is an integer d, it’ll be expanded to (d, d) and (d, d, d) for 2D and 3D inputs respectively.
  • name – layer name string

Resize the image by linearly interpolating the input using TF resize_bilinear function.

Parameters:input_tensor – 2D/3D image tensor, with shape: batch, X, Y, [Z,] Channels
Returns:interpolated volume