Created
October 23, 2020 08:35
-
-
Save adriacabeza/aa4e2e4791fda322cd159e24518f02a4 to your computer and use it in GitHub Desktop.
Revisions
-
adriacabeza created this gist
Oct 23, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ import caffe import numpy as np mean = np.load('mean.npy').mean(1).mean(1) image_dims = (224, 244) model = 'deploy.prototxt' weights = 'resnet-50.caffemodel' net = caffe.Classifier(model, weights, image_dims=image_dims, mean=mean, raw_scale=255, channel_swap=[2, 1, 0]) nb = net.blobs for ctr, name in enumerate(nb): print(ctr, name, nb[name].data.shape)