This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from catalyst.data import ReaderSpec | |
import nibabel as nib | |
import os | |
import numpy as np | |
import math | |
def zero_pad_array(array, d, w, h): | |
'''Function to pad tensors with zeros to same batch_size | |
Args: | |
array (numpy array): The tensor that is to be padded |