Integer printout (#2450)
* Integer printout * test.py 'Labels' * Update train.py
This commit is contained in:
1 parent
886f1c03d8
commit
f01f3223d5
3 files changed
+4
-4
No files matched your search
@@ -120,7 +120,7 @@ def profile(x, ops, n=100, device=None):
|
||||
s_in = tuple(x.shape) if isinstance(x, torch.Tensor) else 'list'
|
||||
s_out = tuple(y.shape) if isinstance(y, torch.Tensor) else 'list'
|
||||
p = sum(list(x.numel() for x in m.parameters())) if isinstance(m, nn.Module) else 0 # parameters
|
||||
print(f'{p:12.4g}{flops:12.4g}{dtf:16.4g}{dtb:16.4g}{str(s_in):>24s}{str(s_out):>24s}')
|
||||
print(f'{p:12}{flops:12.4g}{dtf:16.4g}{dtb:16.4g}{str(s_in):>24s}{str(s_out):>24s}')
|
||||
|
||||
|
||||
def is_parallel(model):
|
||||
|
||||
Reference in new issue
Block a user