mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-26 10:59:53 +08:00
Bump minimum Python version to 3.8 (#1876)
* Bump minimum Python version to 3.8 * typing_extensions.Literal -> typing.Literal * ns-dev-test * typing_extensions.get_args => typing.get_args * Format with older version of black * Bump `black` * Run black
This commit is contained in:
1 parent
7537551f38
commit
63c6303736
58 files changed
+70
-117
No files matched your search
@@ -18,14 +18,13 @@ Encoding functions
|
||||
|
||||
import itertools
|
||||
from abc import abstractmethod
|
||||
from typing import Optional, Sequence
|
||||
from typing import Literal, Optional, Sequence
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
import torch.nn.functional as F
|
||||
from torch import nn
|
||||
from torchtyping import TensorType
|
||||
from typing_extensions import Literal
|
||||
|
||||
from nerfstudio.field_components.base_field_component import FieldComponent
|
||||
from nerfstudio.utils.math import components_from_spherical_harmonics, expected_sin
|
||||
|
||||
@@ -59,7 +59,6 @@ class FieldHead(FieldComponent):
|
||||
in_dim: Optional[int] = None,
|
||||
activation: Optional[Union[nn.Module, Callable]] = None,
|
||||
) -> None:
|
||||
|
||||
super().__init__()
|
||||
self.out_dim = out_dim
|
||||
self.activation = activation
|
||||
@@ -131,7 +130,6 @@ class SHFieldHead(FieldHead):
|
||||
def __init__(
|
||||
self, in_dim: Optional[int] = None, levels: int = 3, channels: int = 3, activation: Optional[nn.Module] = None
|
||||
) -> None:
|
||||
|
||||
out_dim = channels * levels**2
|
||||
super().__init__(in_dim=in_dim, out_dim=out_dim, field_head_name=FieldHeadNames.SH, activation=activation)
|
||||
|
||||
|
||||
@@ -46,7 +46,6 @@ class MLP(FieldComponent):
|
||||
activation: Optional[nn.Module] = nn.ReLU(),
|
||||
out_activation: Optional[nn.Module] = None,
|
||||
) -> None:
|
||||
|
||||
super().__init__()
|
||||
self.in_dim = in_dim
|
||||
assert self.in_dim > 0
|
||||
|
||||
Reference in new issue
Block a user