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

Get rid of some of the deprecation warnings in the buildbot.

上级 ede48744
...@@ -99,6 +99,8 @@ class TestConv2D(utt.InferShapeTester): ...@@ -99,6 +99,8 @@ class TestConv2D(utt.InferShapeTester):
out_shape2d = numpy.array(N_image_shape[-2:]) +\ out_shape2d = numpy.array(N_image_shape[-2:]) +\
s * numpy.array(N_filter_shape[-2:]) - s s * numpy.array(N_filter_shape[-2:]) - s
out_shape2d = numpy.ceil(out_shape2d / numpy.array(subsample)) out_shape2d = numpy.ceil(out_shape2d / numpy.array(subsample))
# avoid numpy deprecation
out_shape2d = out_shape2d.astype('int32')
out_shape = (N_image_shape[0], N_filter_shape[0]) + tuple(out_shape2d) out_shape = (N_image_shape[0], N_filter_shape[0]) + tuple(out_shape2d)
ref_output = numpy.zeros(out_shape) ref_output = numpy.zeros(out_shape)
......
...@@ -97,6 +97,8 @@ class TestCorr2D(utt.InferShapeTester): ...@@ -97,6 +97,8 @@ class TestCorr2D(utt.InferShapeTester):
else: else:
raise NotImplementedError('Unsupported border_mode {}'.format(border_mode)) raise NotImplementedError('Unsupported border_mode {}'.format(border_mode))
out_shape2d = numpy.floor((img_shape2d + 2 * (padHW) - fil_shape2d) / subsample2d) + 1 out_shape2d = numpy.floor((img_shape2d + 2 * (padHW) - fil_shape2d) / subsample2d) + 1
# avoid numpy deprecation
out_shape2d = out_shape2d.astype('int32')
out_shape = (N_image_shape[0], N_filter_shape[0]) + tuple(out_shape2d) out_shape = (N_image_shape[0], N_filter_shape[0]) + tuple(out_shape2d)
ref_output = numpy.zeros(out_shape) ref_output = numpy.zeros(out_shape)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论