4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-11 10:34:29 +08:00
* mps bugfix

* removed docs change

* Double quotes

---------

Co-authored-by: Brent Yi <yibrenth@gmail.com>
This commit is contained in:
Jose 2023-12-01 01:04:01 +01:00 committed by GitHub
parent 43a7da36a5
commit 49503c2175
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -464,6 +464,7 @@ class Trainer:
self.optimizers.zero_grad_all()
cpu_or_cuda_str: str = self.device.split(":")[0]
cpu_or_cuda_str = "cpu" if cpu_or_cuda_str == "mps" else cpu_or_cuda_str
assert (
self.gradient_accumulation_steps > 0
), f"gradient_accumulation_steps must be > 0, not {self.gradient_accumulation_steps}"