From bf86a9be2d06ddb9d7434ce765b581a98c193c3b Mon Sep 17 00:00:00 2001 From: Rakshith Sathish Date: Thu, 14 Nov 2019 12:41:20 +0530 Subject: [PATCH] Added explanation for some variable names Added explanation for variable names (N,s,p) in generate_masks function. --- explanations.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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