提交 e0ef1634 authored 作者: notoraptor's avatar notoraptor

Ensure kern_shape has `dtype` attribute.

上级 e500a276
......@@ -385,6 +385,7 @@ class GpuDnnConvDesc(COp):
self.precision = precision
def make_node(self, kern_shape):
kern_shape = as_tensor_variable(kern_shape)
if kern_shape.type.ndim != 1 or kern_shape.dtype not in theano.tensor.basic.int_dtypes:
raise TypeError('kern must be an int64 1D shape tensor')
kern_shape = theano.tensor.basic.cast(kern_shape, 'int64')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论