提交 53151276 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Fix flake8 and clarify comment.

上级 472b0d76
...@@ -235,7 +235,7 @@ class AbstractConv2d(BaseAbstractConv2d): ...@@ -235,7 +235,7 @@ class AbstractConv2d(BaseAbstractConv2d):
filter_flip) filter_flip)
def make_node(self, img, kern): def make_node(self, img, kern):
# Normalize the inputs types # Make sure both inputs have the same Type
ktype = img.type.clone(dtype=kern.dtype, ktype = img.type.clone(dtype=kern.dtype,
broadcastable=kern.broadcastable) broadcastable=kern.broadcastable)
kern = ktype.filter_variable(kern) kern = ktype.filter_variable(kern)
...@@ -333,7 +333,7 @@ class AbstractConv2d_gradWeights(BaseAbstractConv2d): ...@@ -333,7 +333,7 @@ class AbstractConv2d_gradWeights(BaseAbstractConv2d):
# Update shape/height_width # Update shape/height_width
def make_node(self, img, topgrad, shape): def make_node(self, img, topgrad, shape):
# Normalize the inputs types # Make sure both inputs have the same Type
gtype = img.type.clone(dtype=topgrad.dtype, gtype = img.type.clone(dtype=topgrad.dtype,
broadcastable=topgrad.broadcastable) broadcastable=topgrad.broadcastable)
topgrad = gtype.filter_variable(topgrad) topgrad = gtype.filter_variable(topgrad)
...@@ -425,9 +425,9 @@ class AbstractConv2d_gradInputs(BaseAbstractConv2d): ...@@ -425,9 +425,9 @@ class AbstractConv2d_gradInputs(BaseAbstractConv2d):
# Update shape/height_width # Update shape/height_width
def make_node(self, kern, topgrad, shape): def make_node(self, kern, topgrad, shape):
# Normalize the inputs types # Make sure both inputs have the same Type
gtype = kern.type.clone(dtype=topgrad.dtype, gtype = kern.type.clone(dtype=topgrad.dtype,
broadcastable=topgrad.broadcastable) broadcastable=topgrad.broadcastable)
topgrad = gtype.filter_variable(topgrad) topgrad = gtype.filter_variable(topgrad)
if kern.type.ndim != 4: if kern.type.ndim != 4:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论