I am getting the same error “AttributeError: ‘ImageClassifier’ object has no attribute ‘confusion_matrix’” when I put it in another cell,  I think putting it inside image_classifier.py would be fine since there’s no error and ‘model.confusion_matrix’ worked since I put it inside the image_classifier.py. I just thought it will break the package, but it worked. Thank you so much for the help guys!