Add type and number of dimensions check of theta in make_node of GpuDnnGridGenerator

上级 d01ea5f8
......@@ -2926,6 +2926,9 @@ class GpuDnnGridGenerator(DnnBase):
grid_dimensions = as_tensor_variable(grid_dimensions)
theta = gpu_contiguous(as_gpuarray_variable(theta, context_name))
assert cudnn.cudnnDataType_t.has_alias(theta.dtype)
assert theta.ndim == 3
# Allocate GPU memory for grid of coordinates
grid = GpuArrayType(dtype=self.precision,
broadcastable=(False, False, False, False,),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论