cfchen-duke / ProtoPNet

This code package implements the prototypical part network (ProtoPNet) from the paper "This Looks Like That: Deep Learning for Interpretable Image Recognition" (to appear at NeurIPS 2019), by Chaofan Chen* (Duke University), Oscar Li* (Duke University), Chaofan Tao (Duke University), Alina Jade Barnett (Duke University), Jonathan Su (MIT Lincoln Laboratory), and Cynthia Rudin (Duke University) (* denotes equal contribution).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

model.eval() in local_analysis.py

jxllp opened this issue · comments

commented

First of all, thank you for sharing the source code of this inspiring work. It's really appreciated!

After training the model, the results I was getting making predictions with local_analysis.py didn’t match the accuracy calculated by the method test() in train_and_test.py.

Please correct if I am wrong, but I believe it’s because in local_analysis.py, model.eval() is missing after loading the model.