mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-09 11:32:07 +08:00
fixed correct module on hpc save
This commit is contained in:
@@ -42,6 +42,7 @@ class ModelIO(object):
|
||||
class TrainerIO(object):
|
||||
|
||||
def __get_model(self):
|
||||
print(type(self.model))
|
||||
is_dp_module = type(self.model) is LightningDistributedDataParallel or type(self.model) is LightningDataParallel
|
||||
model = self.model.module if is_dp_module else self.model
|
||||
return model
|
||||
|
||||
@@ -36,4 +36,11 @@ This file fits a tiny model on MNIST using these different set-ups.
|
||||
3. Multiple (2) GPUs using DP + apex (for 16-bit precision).
|
||||
3. Multiple (2) GPUs using DDP + apex (for 16-bit precision).
|
||||
|
||||
For each set up it also tests:
|
||||
1. model saving.
|
||||
2. model loading.
|
||||
3. predicting with a loaded model.
|
||||
4. simulated save from HPC signal.
|
||||
5. simulated load from HPC signal.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user