mirror of https://github.com/Jittor/Jittor
Merge branch 'master' of github.com:514flowey/jittor
This commit is contained in:
commit
eefd57c0f4
|
@ -9,7 +9,7 @@
|
|||
# file 'LICENSE.txt', which is part of this source code package.
|
||||
# ***************************************************************
|
||||
|
||||
__version__ = '1.3.9.11'
|
||||
__version__ = '1.3.9.12'
|
||||
from jittor_utils import lock
|
||||
with lock.lock_scope():
|
||||
ori_int = int
|
||||
|
|
|
@ -347,6 +347,8 @@ def stack(x, dim=0):
|
|||
[[4 5 6]]]
|
||||
'''
|
||||
assert isinstance(x, Sequence)
|
||||
if isinstance(x, tuple):
|
||||
x = list(x)
|
||||
for i,x_ in enumerate(x):
|
||||
x[i] = jt.array(x_)
|
||||
if len(x) < 2:
|
||||
|
|
|
@ -572,6 +572,7 @@ class Dropout(Module):
|
|||
noise = jt.random(input.shape)
|
||||
noise = (noise > self.p).int()
|
||||
output = output * noise / (1.0 - self.p) # div keep prob
|
||||
output = output.to(input.dtype)
|
||||
return output
|
||||
|
||||
def dropout(x,p=0.5,is_train=False):
|
||||
|
|
Loading…
Reference in New Issue