check DDP running correctly

This commit is contained in:
evonneng committed 2022-04-21 17:06:29 +00:00
1 parent 1cb3a02f07
commit af74b4e95c
3 files changed
+5 -26

No files matched your search

+3 -2
View File
@@ -17,6 +17,7 @@ from mattport.nerf.dataset.image_dataset import ImageDataset, collate_batch
from mattport.nerf.dataset.utils import get_dataset_inputs
from mattport.utils.decorators import check_main_thread
logging.getLogger('PIL').setLevel(logging.WARNING)
class Trainer:
"""Training class"""
@@ -129,5 +130,5 @@ class Trainer:
ray_indices = batch.indices.to(f"cuda:{self.local_rank}")
graph_outputs = self.graph(ray_indices)
batch.pixels = batch.pixels.to(f"cuda:{self.local_rank}")
losses = self.graph.get_losses(batch, graph_outputs)
logging.info(losses)
losses = self.graph.module.get_losses(batch, graph_outputs)
# logging.info(losses)