提交 15aef2f8 authored 作者: Frederic Bastien's avatar Frederic Bastien

Better code

上级 71f30a96
...@@ -9,7 +9,6 @@ from theano.tensor.opt import in2out ...@@ -9,7 +9,6 @@ from theano.tensor.opt import in2out
from .basic_ops import as_gpuarray_variable, infer_context_name from .basic_ops import as_gpuarray_variable, infer_context_name
from .opt_util import inplace_allocempty from .opt_util import inplace_allocempty
from .type import GpuArrayType
try: try:
import pygpu import pygpu
...@@ -281,11 +280,8 @@ class GpuDot22(BlasOp): ...@@ -281,11 +280,8 @@ class GpuDot22(BlasOp):
assert x.ndim == 2 assert x.ndim == 2
assert y.ndim == 2 assert y.ndim == 2
assert x.dtype == y.dtype assert x.dtype == y.dtype
otype = GpuArrayType( otype = x.type.clone(
dtype=x.dtype, broadcastable=(x.type.broadcastable[0], y.type.broadcastable[1]))
broadcastable=(x.type.broadcastable[0], y.type.broadcastable[1]),
# Here I suppose both inputs are on the same context.
context_name=x.type.context_name)
return Apply(self, [x, y], [otype()]) return Apply(self, [x, y], [otype()])
def perform(self, node, inputs, outputs): def perform(self, node, inputs, outputs):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论