mirror of https://github.com/Jittor/Jittor
update Softplus Module
This commit is contained in:
parent
4af3f7a0d2
commit
0a5a7f5ea2
|
@ -8,7 +8,7 @@
|
|||
# This file is subject to the terms and conditions defined in
|
||||
# file 'LICENSE.txt', which is part of this source code package.
|
||||
# ***************************************************************
|
||||
__version__ = '1.2.2.11'
|
||||
__version__ = '1.2.2.12'
|
||||
from . import lock
|
||||
with lock.lock_scope():
|
||||
ori_int = int
|
||||
|
|
|
@ -963,7 +963,7 @@ class Softplus(Module):
|
|||
self.threshold = threshold
|
||||
|
||||
def execute(self, x):
|
||||
return 1 / self.beta * jt.log(1 + (self.beta * x).exp())
|
||||
return softplus(x, self.beta, self.threshold)
|
||||
|
||||
class Resize(Module):
|
||||
def __init__(self, size, mode="nearest", align_corners=False):
|
||||
|
|
Loading…
Reference in New Issue