0715-1132
Browse files- diffusion.py +2 -2
diffusion.py
CHANGED
|
@@ -336,8 +336,8 @@ class DDPM21CM:
|
|
| 336 |
self.nn_model.module.load_state_dict(torch.load(config.resume)['unet_state_dict'])
|
| 337 |
print(f"device {torch.cuda.current_device()} resumed nn_model from {config.resume}")
|
| 338 |
|
| 339 |
-
|
| 340 |
-
|
| 341 |
|
| 342 |
# whether to use ema
|
| 343 |
if config.ema:
|
|
|
|
| 336 |
self.nn_model.module.load_state_dict(torch.load(config.resume)['unet_state_dict'])
|
| 337 |
print(f"device {torch.cuda.current_device()} resumed nn_model from {config.resume}")
|
| 338 |
|
| 339 |
+
self.number_of_params = sum(x.numel() for x in self.nn_model.parameters())
|
| 340 |
+
print(f" Number of parameters for nn_model: {self.number_of_params} ".center(100,'-'))
|
| 341 |
|
| 342 |
# whether to use ema
|
| 343 |
if config.ema:
|