A PyTorch library to analyze representation of neural networks
anatome Ἀνατομή is a PyTorch library to analyze internal representation of neural networks This project is under active development and the codebase is subject to change. Installation anatome requires Python>=3.9.0 PyTorch>=1.9.0 torchvision>=0.10.0 After the installation of PyTorch, install anatome as follows: pip install -U git+https://github.com/moskomule/anatome Representation Similarity To measure the similarity of learned representation, anatome.SimilarityHook is a useful tool. Currently, the followingmethods are implemented. from anatome import SimilarityHook model = resnet18() hook1 = SimilarityHook(model, “layer3.0.conv1”) hook2 = SimilarityHook(model, “layer3.0.conv2”) model.eval() […]
Read more