mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-07 00:09:14 +08:00
Fix registered value.
This commit is contained in:
1 parent
146332cfb6
commit
736e72914a
1 file changed
+2
-2
@@ -138,8 +138,8 @@ class RFFEncoding(Encoding):
|
|||||||
if not scale > 0:
|
if not scale > 0:
|
||||||
raise ValueError("RFF encoding scale should be greater than zero")
|
raise ValueError("RFF encoding scale should be greater than zero")
|
||||||
self.scale = scale
|
self.scale = scale
|
||||||
self.b_matrix = torch.normal(mean=0, std=self.scale, size=(self.in_dim, self.num_frequencies))
|
b_matrix = torch.normal(mean=0, std=self.scale, size=(self.in_dim, self.num_frequencies))
|
||||||
self.register_buffer(name="rff_scalings", tensor=self.b_matrix)
|
self.register_buffer(name="b_matrix", tensor=b_matrix)
|
||||||
|
|
||||||
def get_out_dim(self) -> int:
|
def get_out_dim(self) -> int:
|
||||||
return self.num_frequencies * 2
|
return self.num_frequencies * 2
|
||||||
|
|||||||
Reference in new issue
Block a user