text: from pytorch_grad_cam import GradCAM
  from pytorch_grad_cam.utils.model_targets import ClassifierOutputTarget
  from pytorch_grad_cam.utils.image import show_cam_on_image
  from torchvision import models
  from PIL import Image
  import torch
  from torch.utils.data import Dataset, DataLoader
  import numpy as np
  import torchvision
  from torchvision import transforms
  import os
  
  model = models.resnet50(pretrained=True)
  
  input_tensor = transforms.Compose([ transforms.Resize((256,256)), 
                                      transforms.CenterCrop(224),
                                      transforms.ToTensor(),
                                      transforms.Normalize((0.485, 0.456, 0.406), (0.229, 0.224, 0.225))])
  
  # trainset = torchvision.datasets.ImageFolder(root ="/home/juyoung/ImageNet-O/imagenet-o", 
  # 					transform = input_tensor)
  
  
  # Construct the CAM object once, and then re-use it on many images:
  # cam = GradCAM(model=model, target_layers=target_layers, use_cuda=args.use_cuda)
  
  # # You can also use it within a with statement, to make sure it is freed,
  # # In case you need to re-create it inside an outer loop:
  # # with GradCAM(model=model, target_layers=target_layers, use_cuda=args.use_cuda) as cam:
  # #   ...
  
  # # We have to specify the target we want to generate
  # # the Class Activation Maps for.
  # # If targets is None, the highest scoring category
  # # will be used for every image in the batch.
  # # Here we use ClassifierOutputTarget, but you can define your own custom targets
  # # That are, for example, combinations of categories, or specific outputs in a non standard model.
  # targets = [e.g ClassifierOutputTarget(281)]
  
  # # You can also pass aug_smooth=True and eigen_smooth=True, to apply smoothing.
  # grayscale_cam = cam(input_tensor=input_tensor, target_category=target_category)
  
  # # In this example grayscale_cam has only one image in the batch:
  # grayscale_cam = grayscale_cam[0, :]
  # visualization = show_cam_on_image(rgb_img, grayscale_cam, use_rgb=True)