def _test_nd_downsample_output_shape(self,
                                         rank,
                                         param_dict,
                                         output_shape):
        if rank == 2:
            input_data = self.get_2d_input()
        elif rank == 3:
            input_data = self.get_3d_input()
        downsample_layer = DownSampleLayer(**param_dict)
        output_data = downsample_layer(input_data)
        print(downsample_layer)
        with self.cached_session() as sess:
            sess.run(tf.global_variables_initializer())
            out = sess.run(output_data)
            self.assertAllClose(output_shape, out.shape)