fcc43d79d2ea107c789d53424825ec9ffe8788f8,vgg.py,,load_net,#,22
Before Change
def load_net(data_path):
data = scipy.io.loadmat(data_path)
if not all(i in data for i in ("layers", "classes", "normalization")):
raise ValueError("You"re using the wrong VGG19 data. Please follow the instructions in the README to download the correct data.")
mean = data["normalization"][0][0][0]
mean_pixel = np.mean(mean, axis=(0, 1))
After Change
def load_net(data_path):
data = scipy.io.loadmat(data_path)
if "normalization" in data:
// old format, for data where
// MD5(imagenet-vgg-verydeep-19.mat) = 8ee3263992981a1d26e73b3ca028a123
mean_pixel = np.mean(data["normalization"][0][0][0], axis=(0, 1))
else:
// new format, for data where
// MD5(imagenet-vgg-verydeep-19.mat) = 106118b7cf60435e6d8e04f6a6dc3657
mean_pixel = data["meta"]["normalization"][0][0][0][0][2][0][0]
weights = data["layers"][0]
return weights, mean_pixel
def net_preloaded(weights, input_image, pooling):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: anishathalye/neural-style
Commit Name: fcc43d79d2ea107c789d53424825ec9ffe8788f8
Time: 2018-11-23
Author: me@anishathalye.com
File Name: vgg.py
Class Name:
Method Name: load_net
Project Name: UFAL-DSG/tgen
Commit Name: fb50688c503567c5db6207e45e2c5e2ee1ad33df
Time: 2014-08-25
Author: odusek@ufal.mff.cuni.cz
File Name: tgen/features.py
Class Name:
Method Name: depth
Project Name: aertslab/pySCENIC
Commit Name: 0e6804ca93a4f76300134a126d5942114b71901c
Time: 2018-12-14
Author: vandesande.bram@gmail.com
File Name: src/pyscenic/cli/pyscenic.py
Class Name:
Method Name: prune_targets_command