Merge pull request #9 from plenoptix/tancik/fix_rff_state_save

Register RFF scaling to state
This commit is contained in:
Matthew Tancik authored and GitHub committed 2022-06-02 09:56:09 -07:00
commit 1f189b3e54
1 file changed
+1
+1
View File
@@ -139,6 +139,7 @@ class RFFEncoding(Encoding):
raise ValueError("RFF encoding scale should be greater than zero")
self.scale = scale
self.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)
def get_out_dim(self) -> int:
return self.num_frequencies * 2