niftynet.layer.upsample module

class UpSampleLayer(func, kernel_size=3, stride=2, w_initializer=None, w_regularizer=None, with_bias=False, b_initializer=None, b_regularizer=None, name='upsample')[source]

Bases: niftynet.layer.base_layer.TrainableLayer

This class defines channel-wise upsampling operations. Different from DeconvLayer, the elements are not mixed in the channel dim.

REPLICATE mode replicates each spatial_dim into spatial_dim*kernel_size CHANNELWISE_DECONV` mode makes a projection using a kernel. e.g., With 2D input (without loss of generality), given input [N, X, Y, C], the output is [N, X*kernel_size, Y*kernel_size, C].

layer_op(input_tensor)[source]