提交 5c9d3118 authored 作者: notoraptor's avatar notoraptor

Wrap Op params for theano.gpuarray.neighbours.GpuImages2Neibs:

- mode (enum list) - context (gpu_context_type) Add Kernel param for theano.gpuarray.neighbours.GpuImages2Neibs: - mode (ga_int) That helps very much to reduce C code variability (from 18 individual ops to about 6 modules with more than 1 op).
上级 1433cacb
...@@ -52,8 +52,8 @@ class Images2Neibs(Op): ...@@ -52,8 +52,8 @@ class Images2Neibs(Op):
def __init__(self, mode='valid'): def __init__(self, mode='valid'):
implemented_modes = self.params_type.get_aliases() implemented_modes = self.params_type.get_aliases()
if mode not in implemented_modes: if mode not in implemented_modes:
raise NotImplementedError("Only modes %s have been implemented for Images2Neibs" raise NotImplementedError("Only modes %s have been implemented for %s"
% ', '.join(implemented_modes)) % (', '.join(implemented_modes), type(self).__name__))
self.mode = mode self.mode = mode
def __str__(self): def __str__(self):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论