We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6d43ac commit 80003caCopy full SHA for 80003ca
nerfstudio/field_components/activations.py
@@ -29,13 +29,13 @@ class _TruncExp(Function):
29
# Implementation from torch-ngp:
30
# https://github.com/ashawkey/torch-ngp/blob/93b08a0d4ec1cc6e69d85df7f0acdfb99603b628/activation.py
31
@staticmethod
32
- @custom_fwd(cast_inputs=torch.float32, device_type='cuda')
+ @custom_fwd(cast_inputs=torch.float32, device_type="cuda")
33
def forward(ctx, x):
34
ctx.save_for_backward(x)
35
return torch.exp(x)
36
37
38
- @custom_bwd(device_type='cuda')
+ @custom_bwd(device_type="cuda")
39
def backward(ctx, g):
40
x = ctx.saved_tensors[0]
41
return g * torch.exp(x.clamp(-15, 15))
0 commit comments