Last active
August 16, 2019 06:03
-
-
Save andrewschreiber/3a9f2e80be1918d71c86f3e9048238eb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from model.data import mnist_train_test_sets | |
from model.network import LeNet5 | |
from saliency.vanilla_gradient import save_vanilla_gradient | |
# Get MNIST dataset, preprocessed | |
train_images, train_labels, test_images, test_labels = mnist_train_test_sets() | |
# Load net with 98% acc weights | |
net = LeNet5(weights_path="15epoch_weights.pkl") | |
# Generate saliency maps for the first 10 images | |
save_vanilla_gradient(network=net, data=train_images[:10], labels=target_labels[:10]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment