提交 0d268386 authored 作者: Frederic Bastien's avatar Frederic Bastien

small change.

上级 21d76325
......@@ -29,7 +29,7 @@ def as_cuda_ndarray_variable(x):
if hasattr(x, '_as_CudaNdarrayVariable'):
return x._as_CudaNdarrayVariable()
tensor_x = tensor.as_tensor_variable(x)
return GpuFromHost()(tensor_x)
return gpu_from_host(tensor_x)
class HostFromGpu(Op):
def __eq__(self, other):
......@@ -1833,7 +1833,7 @@ class GpuAlloc(Op):
def make_node(self, value, *shape):
#if their is unneeded transfert generated by the next line
#the optimizer will remove them.
v = gpu_from_host(tensor.as_tensor_variable(value))
v = as_cuda_ndarray_variable(value)
sh = [tensor.as_tensor_variable(s) for s in shape]
bcast = []
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论