From 15e62c6966792129b3163f7fe1e1b9d0f7cbdd26 Mon Sep 17 00:00:00 2001 From: Matt Tancik Date: Mon, 23 May 2022 17:26:47 -0700 Subject: [PATCH] Fix typing --- mattport/nerf/fields/base.py | 4 ++-- mattport/nerf/fields/nerf_field.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mattport/nerf/fields/base.py b/mattport/nerf/fields/base.py index 1e03db539..23bcf6656 100644 --- a/mattport/nerf/fields/base.py +++ b/mattport/nerf/fields/base.py @@ -3,7 +3,7 @@ Base class for the graphs. """ from abc import abstractmethod -from typing import Optional, Tuple +from typing import Dict, Optional, Tuple from torch import nn import torch @@ -37,7 +37,7 @@ class Field(nn.Module): @abstractmethod def get_outputs( self, point_samples: PointSamples, density_embedding: Optional[TensorType] = None - ) -> dict[FieldHeadNames, TensorType]: + ) -> Dict[FieldHeadNames, TensorType]: """Computes and returns the colors. Args: diff --git a/mattport/nerf/fields/nerf_field.py b/mattport/nerf/fields/nerf_field.py index 99c9267f8..507e544ff 100644 --- a/mattport/nerf/fields/nerf_field.py +++ b/mattport/nerf/fields/nerf_field.py @@ -1,7 +1,7 @@ """ Classic NeRF field""" -from typing import Optional, Tuple +from typing import Dict, Optional, Tuple import torch from torch import nn @@ -70,7 +70,7 @@ class NeRFField(Field): def get_outputs( self, point_samples: PointSamples, density_embedding: Optional[TensorType] = None - ) -> dict[FieldHeadNames, TensorType]: + ) -> Dict[FieldHeadNames, TensorType]: """Computes and returns the outputs.""" outputs = {} for field_head in self.field_heads: