提交 f3844589 authored 作者: Frédéric Bastien's avatar Frédéric Bastien 提交者: GitHub

Merge pull request #5568 from notoraptor/fix-windows

Clarify error message related to expected kern_shape specs (1D, int64) in GpuDnnConvDesc
......@@ -385,8 +385,10 @@ class GpuDnnConvDesc(COp):
self.precision = precision
def make_node(self, kern_shape):
if kern_shape.type.ndim != 1 or kern_shape.type.dtype != 'int64':
raise TypeError('kern must be 1D shape tensor')
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')
node = Apply(self, [kern_shape],
[CDataType("cudnnConvolutionDescriptor_t",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论