Skip to content

Commit

Permalink
Formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
famura committed Jul 17, 2024
1 parent 51d2b2f commit e19eb60
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions neuralfields/simple_neural_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,14 +369,10 @@ def _init_capacity_heuristic(self, activation_nonlin: ActivationFunction) -> tor
"""
if activation_nonlin is torch.sigmoid:
# sigmoid(7.) approx 0.999
return PotentialBased.transform_to_opt_space(
torch.tensor([7.0], dtype=torch.get_default_dtype())
)
return PotentialBased.transform_to_opt_space(torch.tensor([7.0], dtype=torch.get_default_dtype()))
elif activation_nonlin is torch.tanh:
# tanh(3.8) approx 0.999
return PotentialBased.transform_to_opt_space(
torch.tensor([3.8], dtype=torch.get_default_dtype())
)
return PotentialBased.transform_to_opt_space(torch.tensor([3.8], dtype=torch.get_default_dtype()))
raise NotImplementedError(
"For the potential dynamics including a capacity, the initialization heuristic only supports "
"the activation functions `torch.sigmoid` and `torch.tanh`!"
Expand Down

0 comments on commit e19eb60

Please sign in to comment.