提交 fbf362b1 authored 作者: affanv14's avatar affanv14 提交者: Mohammed Affan

fix conditions

上级 bb1eef1f
...@@ -183,7 +183,8 @@ def get_conv_gradweights_shape(image_shape, top_shape, ...@@ -183,7 +183,8 @@ def get_conv_gradweights_shape(image_shape, top_shape,
if filter_dilation is None: if filter_dilation is None:
filter_dilation = np.ones(len(subsample), dtype='int') filter_dilation = np.ones(len(subsample), dtype='int')
if num_groups > 1 and len(subsample) == 2: if num_groups > 1:
assert len(subsample) == 2
nchan = nchan // num_groups nchan = nchan // num_groups
if isinstance(border_mode, tuple): if isinstance(border_mode, tuple):
...@@ -293,7 +294,8 @@ def get_conv_gradinputs_shape(kernel_shape, top_shape, ...@@ -293,7 +294,8 @@ def get_conv_gradinputs_shape(kernel_shape, top_shape,
if filter_dilation is None: if filter_dilation is None:
filter_dilation = np.ones(len(subsample), dtype='int') filter_dilation = np.ones(len(subsample), dtype='int')
if num_groups > 1 and len(subsample) == 2: if num_groups > 1:
assert len(subsample) == 2
nkern = nkern * num_groups nkern = nkern * num_groups
if isinstance(border_mode, tuple): if isinstance(border_mode, tuple):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论