use my fine-tuned model
HIN0209 opened this issue · comments
HIN0209 commented
Hello,
I have fine-tuned VGG19 on my custom image set. Please guide how to modify the code to use my model.
Thank you!
PS. I meant, how to use my pretrained VGG19 weights. Thank you again.
Kazuto Nakashima commented
Please replace:
- the
model
with your VGG-19 instance.
https://github.com/kazuto1011/grad-cam-pytorch/blob/master/main.py#L97 - the
CONFIG['input_size']
with a image size.
https://github.com/kazuto1011/grad-cam-pytorch/blob/master/main.py#L101 - the
CONFIG['target_layer']
with a layer name you want to observe.
https://github.com/kazuto1011/grad-cam-pytorch/blob/master/main.py#L120
You can check the layer names of your model with
print(*list(model.named_modules()), sep='\n')
HIN0209 commented
Thank you!! I will try it.