Пример #1
0
    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')

        return Apply(self, [kern_shape],
                     [CDataType("cudnnConvolutionDescriptor_t",
                                freefunc="cudnnDestroyConvolutionDescriptor")()])
Пример #2
0
    def make_node(self, img_shape, kern_shape):
        if img_shape.type.ndim != 1 or img_shape.type.dtype != 'int64':
            raise TypeError('img must be 1D shape tensor')
        if kern_shape.type.ndim != 1 or kern_shape.type.dtype != 'int64':
            raise TypeError('kern must be 1D shape tensor')

        return Apply(self, [img_shape, kern_shape],
                     [CDataType("cudnnConvolutionDescriptor_t")()])
Пример #3
0
 def make_node(self):
     return Apply(self, [], [CDataType("cudnnPoolingDescriptor_t")()])
Пример #4
0
 def make_node(self, i):
     return Apply(self, [i], [CDataType("void *", "py_decref")()])
Пример #5
0
 def make_node(self, i):
     return Apply(self, [i], [CDataType('void *', 'py_decref')()])
Пример #6
0
 def make_node(self):
     return Apply(self, [],
                  [CDataType("cudnnPoolingDescriptor_t",
                             freefunc="cudnnDestroyPoolingDescriptor")()])
Пример #7
0
 def make_node(self):
     return Apply(self, [],
                  [CDataType("cudnnConvolutionDescriptor_t")()])