How to use the saliency.tensor_extractor.FullGradExtractor function in saliency

To help you get started, we’ve selected a few saliency examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github idiap / fullgrad-saliency / saliency / fullgrad.py View on Github external
def __init__(self, model, im_size = (3,224,224) ):
        self.model = model
        self.im_size = (1,) + im_size
        self.model_ext = FullGradExtractor(model, im_size)
        self.biases = self.model_ext.getBiases()
        self.checkCompleteness()
github idiap / fullgrad-saliency / saliency / simple_fullgrad.py View on Github external
def __init__(self, model, im_size = (3,224,224) ):
        self.model = model
        self.im_size = (1,) + im_size
        self.model_ext = FullGradExtractor(model, im_size)