mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-04 06:49:13 +08:00
fix lint errors
This commit is contained in:
1 parent
05f2537605
commit
631a694f6b
1 file changed
+3
-4
@@ -17,13 +17,12 @@ from mattport.nerf.dataset.image_dataset import ImageDataset, collate_batch
|
|||||||
from mattport.nerf.dataset.utils import get_dataset_inputs
|
from mattport.nerf.dataset.utils import get_dataset_inputs
|
||||||
from mattport.utils.decorators import check_main_thread
|
from mattport.utils.decorators import check_main_thread
|
||||||
|
|
||||||
logging.getLogger('PIL').setLevel(logging.WARNING)
|
logging.getLogger("PIL").setLevel(logging.WARNING)
|
||||||
|
|
||||||
|
|
||||||
class Trainer:
|
class Trainer:
|
||||||
"""Training class"""
|
"""Training class"""
|
||||||
|
|
||||||
# pylint: disable=too-many-instance-attributes
|
|
||||||
|
|
||||||
def __init__(self, config: DictConfig, local_rank: int = 0, world_size: int = 1):
|
def __init__(self, config: DictConfig, local_rank: int = 0, world_size: int = 1):
|
||||||
self.config = config
|
self.config = config
|
||||||
self.local_rank = local_rank
|
self.local_rank = local_rank
|
||||||
@@ -131,4 +130,4 @@ class Trainer:
|
|||||||
graph_outputs = self.graph(ray_indices)
|
graph_outputs = self.graph(ray_indices)
|
||||||
batch.pixels = batch.pixels.to(f"cuda:{self.local_rank}")
|
batch.pixels = batch.pixels.to(f"cuda:{self.local_rank}")
|
||||||
losses = self.graph.module.get_losses(batch, graph_outputs)
|
losses = self.graph.module.get_losses(batch, graph_outputs)
|
||||||
# logging.info(losses)
|
logging.info(losses)
|
||||||
Reference in new issue
Block a user