Proper padding for inference with 2d or 2.5d
@@ -19,9 +19,13 @@ from utilities.input_placeholders import ImagePatch
def run(net_class, param, csv_dict, device_str):
param.queue_length = max(param.queue_length, param.batch_size)
# expanding a few of the user input parameters
+ if param.spatial_rank == 3:
spatial_padding = ((param.volume_padding_size, param.volume_padding_size),
(param.volume_padding_size, param.volume_padding_size),
(param.volume_padding_size, param.volume_padding_size))
+ else:
+ spatial_padding = ((param.volume_padding_size, param.volume_padding_size),
+ (param.volume_padding_size, param.volume_padding_size))
param_n_channel_out = 1 if not param.output_prob else param.num_classes
interp_order = (param.image_interp_order,
param.label_interp_order,
