Skip to content

Commit f384458

Browse files
authored
Merge pull request #5568 from notoraptor/fix-windows
Clarify error message related to expected kern_shape specs (1D, int64) in GpuDnnConvDesc
2 parents 8fb9d9a + e0ef163 commit f384458

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

theano/gpuarray/dnn.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,10 @@ def __init__(self, border_mode, subsample=(1, 1), conv_mode='conv',
385385
self.precision = precision
386386

387387
def make_node(self, kern_shape):
388-
if kern_shape.type.ndim != 1 or kern_shape.type.dtype != 'int64':
389-
raise TypeError('kern must be 1D shape tensor')
388+
kern_shape = as_tensor_variable(kern_shape)
389+
if kern_shape.type.ndim != 1 or kern_shape.dtype not in theano.tensor.basic.int_dtypes:
390+
raise TypeError('kern must be an int64 1D shape tensor')
391+
kern_shape = theano.tensor.basic.cast(kern_shape, 'int64')
390392

391393
node = Apply(self, [kern_shape],
392394
[CDataType("cudnnConvolutionDescriptor_t",

0 commit comments

Comments
 (0)