Esempio n. 1
0
	def _backprop(self, ctx):
		if ctx.grad is not None:
			array.raddouter(ctx.grad.data, ctx.trace.idata, ctx.dst)
		array.dot(ctx.src, ctx.state.data, ctx.dst)
Esempio n. 2
0
	def _transmit(self, ctx):
		if ctx.trace is not None:
			array.copy(ctx.trace.idata, ctx.src)
		array.dot(ctx.dst, ctx.src, ctx.state.data)