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.TrainableLayerThis class defines channel-wise upsampling operations. Different from
DeconvLayer, the elements are not mixed in the channel dim.REPLICATEmode replicates each spatial_dim intospatial_dim*kernel_sizeCHANNELWISE_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].