Fix MNIST test data loading, add named buffer summary
This commit is contained in:
parent
ced13a4351
commit
7db99ffa51
3 changed files with 10 additions and 3 deletions
3
train.py
3
train.py
|
|
@ -20,6 +20,9 @@ def parameter_summary(network: torch.nn.Module) -> List[Tuple[str, Tuple[int], s
|
|||
for name, param in network.named_parameters():
|
||||
numpy = param.detach().cpu().numpy()
|
||||
parameter_info.append((name, numpy.shape, human_size(numpy.size * numpy.dtype.itemsize)))
|
||||
for name, param in network.named_buffers():
|
||||
numpy = param.detach().cpu().numpy()
|
||||
parameter_info.append((name, numpy.shape, human_size(numpy.size * numpy.dtype.itemsize)))
|
||||
return parameter_info
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue