def fprop(self, x):
# This is black magic based on broadcasting,
# that's why variable names don't make any sense.
a = TT.shape_padleft(x)
padding = [1] * x.ndim
b = TT.alloc(numpy.float32(1), self.n_times, *padding)
self.out = a * b
return self.out
评论列表
文章目录