提交 7d036b85 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Make sure that subsample is a tuple not a list.

上级 2fc9f319
...@@ -408,7 +408,7 @@ class BaseAbstractConv2d(Op): ...@@ -408,7 +408,7 @@ class BaseAbstractConv2d(Op):
if len(subsample) != 2: if len(subsample) != 2:
raise ValueError("subsample must have two elements") raise ValueError("subsample must have two elements")
self.subsample = subsample self.subsample = tuple(subsample)
def flops(self, inp, outp): def flops(self, inp, outp):
""" Useful with the hack in profilemode to print the MFlops""" """ Useful with the hack in profilemode to print the MFlops"""
......
...@@ -52,7 +52,7 @@ class BaseCorrMM(gof.Op): ...@@ -52,7 +52,7 @@ class BaseCorrMM(gof.Op):
self.border_mode = border_mode self.border_mode = border_mode
if len(subsample) != 2: if len(subsample) != 2:
raise ValueError("subsample must have two elements") raise ValueError("subsample must have two elements")
self.subsample = subsample self.subsample = tuple(subsample)
@property @property
def pad(self): def pad(self):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论