Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_image_saliency_result(model, raw_image, input, label,
methods=['smooth_grad', 'gradcam', 'vanilla_grad', 'grad_x_input'],
layer_path=None):
result = list()
for method in methods:
sal = get_saliency(model, raw_image, input, label, method=method, layer_path=layer_path)
if sal is not None:
result.append(SaliencyImage(raw_image, sal, method))
return result