Ejemplo n.º 1
0
 def __init__(self, dtype=None, context_name=None):
     if dtype is None:
         dtype = config.floatX
     self.dtype = dtype
     self.context_name = context_name
     CGpuKernelBase.__init__(self, ["c_code/tstgpueye.c"],
                             "APPLY_SPECIFIC(tstgpueye)")
Ejemplo n.º 2
0
 def __init__(self, ignore_border, mode="max", ndim=2):
     self.ndim = ndim
     self.ignore_border = ignore_border
     self.mode = mode
     CGpuKernelBase.__init__(self, ["c_code/pool_max_rop.c"],
                             "APPLY_SPECIFIC(max_pool_rop)")
     assert mode == "max"
     assert ndim in [2, 3]
Ejemplo n.º 3
0
 def __init__(self, ignore_border, mode="max", ndim=2):
     self.ndim = ndim
     self.ignore_border = ignore_border
     self.mode = mode
     CGpuKernelBase.__init__(self, ["c_code/pool_grad_grad.c"],
                             "APPLY_SPECIFIC(pool_grad_grad)")
     assert self.mode == "max"
     assert self.ndim in (2, 3)
Ejemplo n.º 4
0
 def __init__(self, ignore_border, mode="max", ndim=2):
     self.ndim = ndim
     self.ignore_border = ignore_border
     if mode == "average":
         mode = "average_inc_pad"
     self.mode = mode
     CGpuKernelBase.__init__(self, ["c_code/pool.c"],
                             "APPLY_SPECIFIC(pool)")
     assert PoolingMode_t.has_alias(self.mode)
     assert self.ndim in [2, 3]
Ejemplo n.º 5
0
 def __init__(self, ignore_border, mode="max", ndim=2):
     self.ndim = ndim
     self.ignore_border = ignore_border
     if mode == "average":
         mode = "average_inc_pad"
     self.mode = mode
     CGpuKernelBase.__init__(self, ["c_code/pool_ave_grad.c"],
                             "APPLY_SPECIFIC(ave_pool_grad)")
     assert mode in ("sum", "average_inc_pad", "average_exc_pad")
     assert ndim in [2, 3]