This commit is contained in:
Glenn Jocher 2020-03-09 11:20:22 -07:00
parent cd76a1a982
commit 6bd51b75ea
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ def model_info(model, report='summary'):
# Plots a line-by-line description of a PyTorch model
n_p = sum(x.numel() for x in model.parameters()) # number parameters
n_g = sum(x.numel() for x in model.parameters() if x.requires_grad) # number gradients
if report is 'full':
if report == 'full':
print('%5s %40s %9s %12s %20s %10s %10s' % ('layer', 'name', 'gradient', 'parameters', 'shape', 'mu', 'sigma'))
for i, (name, p) in enumerate(model.named_parameters()):
name = name.replace('module_list.', '')