diff --git a/explanations.py b/explanations.py index 47cb5f8..b3a6e3d 100644 --- a/explanations.py +++ b/explanations.py @@ -11,8 +11,13 @@ def __init__(self, model, input_size, gpu_batch=100): self.model = model self.input_size = input_size self.gpu_batch = gpu_batch - + def generate_masks(self, N, s, p1, savepath='masks.npy'): + + ''' N is the number of masks used, + (s, s) is the size of the smaller square binary masks, + p is the probability of each pixel in the smaller masks being set to 1.''' + cell_size = np.ceil(np.array(self.input_size) / s) up_size = (s + 1) * cell_size