|
|
|
|
|
|
diff = summary.get_diff( self.past_sum, sum1) |
|
|
|
summary.print_(diff) |
|
|
|
self.past_sum = sum1 |
|
|
|
tmp = 0 |
|
|
|
tmp_tensor = 0 |
|
|
|
tmp_module = 0 |
|
|
|
tmp+=1 |
|
|
|
tmp_tensor+=1 |
|
|
|
print("Total number of tensors", tmp) |
|
|
|
try: |
|
|
|
if isinstance(obj, torch.nn.Module): |
|
|
|
tmp_module+=1 |
|
|
|
except: |
|
|
|
pass |
|
|
|
print("Total number of tensors", tmp_tensor, " of modules", tmp_module) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|