Backward compatibility for torch 1.x and fix for windows (#1962)

* backward compatibility for torch 1.x and fix for windows

* Update pyproject.toml

* Update README.md

* Update README.md

(As per request)

---------

Co-authored-by: machenmusik <machenmusik@users.noreply.github.com>
This commit is contained in:
Jonáš Kulhánekandmachenmusik authored and GitHub committed 2023-05-22 08:58:08 -07:00
1 parent c86ae8a07f
commit 3bc160cc7d
6 files changed
+33 -6

No files matched your search

+6 -1
View File
@@ -21,7 +21,12 @@ from typing import Literal, Optional, Tuple, Type
import numpy as np
from torch.optim import Optimizer, lr_scheduler
from torch.optim.lr_scheduler import LRScheduler
try:
from torch.optim.lr_scheduler import LRScheduler
except ImportError:
# Backwards compatibility for PyTorch 1.x
from torch.optim.lr_scheduler import _LRScheduler as LRScheduler
from nerfstudio.configs.base_config import InstantiateConfig