xnn.common.models.ops.Softplus#
- class xnn.common.models.ops.Softplus(*args, **kwargs)[source]#
Bases:
ModuleSoftplus
log(1 + e^x)evaluated exactly at everyx, asmax(x, 0) + log1p(e^-|x|).torch.nn.Softplusswitches toxabove its threshold and drops thelog1ptail; this one keeps it (the softplus of the HDNNP networks).- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.