提交 2656747a authored 作者: Saizheng Zhang's avatar Saizheng Zhang

rng

上级 42750428
......@@ -317,9 +317,14 @@ class mrg_uniform_base(Op):
# this op should not be called directly.
#
# call through MRG_RandomStreams instead.
broad=[]
for i in self.output_type.ndim:
broad.append(T.extract_constant(size[i]) == 1)
output_type = self.output_type.clone(broadcastab le=broad)()
return Apply(self,
[rstate, size],
[rstate.type(), self.output_type()])
[rstate.type(), output_type])
def grad(self, inputs, ograd):
return [gradient.grad_undefined(self, k, inp,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论