Update WW

This commit is contained in:
D-X-Y
2020-03-13 14:00:54 -07:00
parent 1fcde3e8ac
commit ac08b7be1a
4 changed files with 57 additions and 102 deletions

View File

@@ -9,12 +9,23 @@ from utils import weight_watcher
def main():
model = models.vgg19_bn(pretrained=True)
_, summary = weight_watcher.analyze(model, alphas=False)
# print(summary)
for key, value in summary.items():
print('{:10s} : {:}'.format(key, value))
# import pdb; pdb.set_trace()
# model = models.vgg19_bn(pretrained=True)
# _, summary = weight_watcher.analyze(model, alphas=False)
# for key, value in summary.items():
# print('{:10s} : {:}'.format(key, value))
_, summary = weight_watcher.analyze(models.vgg13(pretrained=True), alphas=False)
print('vgg-13 : {:}'.format(summary['lognorm']))
_, summary = weight_watcher.analyze(models.vgg13_bn(pretrained=True), alphas=False)
print('vgg-13-BN : {:}'.format(summary['lognorm']))
_, summary = weight_watcher.analyze(models.vgg16(pretrained=True), alphas=False)
print('vgg-16 : {:}'.format(summary['lognorm']))
_, summary = weight_watcher.analyze(models.vgg16_bn(pretrained=True), alphas=False)
print('vgg-16-BN : {:}'.format(summary['lognorm']))
_, summary = weight_watcher.analyze(models.vgg19(pretrained=True), alphas=False)
print('vgg-19 : {:}'.format(summary['lognorm']))
_, summary = weight_watcher.analyze(models.vgg19_bn(pretrained=True), alphas=False)
print('vgg-19-BN : {:}'.format(summary['lognorm']))
if __name__ == '__main__':