未验证 提交 846787d4 编写于 作者: C ceci3 提交者: GitHub

fix bug when paddle upgrade (#606)

上级 05d8846b
......@@ -275,17 +275,18 @@ class SuperConv2D(fluid.dygraph.Conv2D):
_input_filter,
shape=[(_input_filter.shape[0] * _input_filter.shape[1]),
-1])
_tmp_filter = _varbase_creator(dtype=_input_filter.dtype)
core.ops.matmul(_input_filter,
self.__getattr__('%dto%d_matrix' %
(src_ks, target_ks)),
_input_filter, 'transpose_X', False,
_tmp_filter, 'transpose_X', False,
'transpose_Y', False, "alpha", 1)
_input_filter = fluid.layers.reshape(
_input_filter,
_tmp_filter = fluid.layers.reshape(
_tmp_filter,
shape=[
filters.shape[0], filters.shape[1], target_ks, target_ks
])
start_filter = _input_filter
start_filter = _tmp_filter
filters = start_filter
return filters
......@@ -572,17 +573,18 @@ class SuperConv2DTranspose(fluid.dygraph.Conv2DTranspose):
_input_filter,
shape=[(_input_filter.shape[0] * _input_filter.shape[1]),
-1])
_tmp_filter = _varbase_creator(dtype=_input_filter.dtype)
core.ops.matmul(_input_filter,
self.__getattr__('%dto%d_matrix' %
(src_ks, target_ks)),
_input_filter, 'transpose_X', False,
_tmp_filter, 'transpose_X', False,
'transpose_Y', False, "alpha", 1)
_input_filter = fluid.layers.reshape(
_input_filter,
_tmp_filter = fluid.layers.reshape(
_tmp_filter,
shape=[
filters.shape[0], filters.shape[1], target_ks, target_ks
])
start_filter = _input_filter
start_filter = _tmp_filter
filters = start_filter
return filters
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册