Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.

Commit ab17374

Browse files
author
DarrenZhang01
committed
Move np.asarray wrapper to TF pool.
1 parent 588b748 commit ab17374

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tf_helpers/lax.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,8 @@ def reduce_window(inputs, init_value, reducer, window_dimensions, strides,
310310
# input is already of default data format - "N...C". The adjustments of the
311311
# input shape is already finished in apply_fun of Pooling in stax.
312312
pooling = "AVG" if reducer == np.add else "MAX"
313-
output = nn.pool(inputs, window_dimensions, pooling, strides, padding)
314-
return np.squeeze(np.asarray(output), axis=(0, output.ndim - 1))
313+
output = np.asarray(nn.pool(inputs, window_dimensions, pooling, strides, padding))
314+
return np.squeeze(output, axis=(0, output.ndim - 1))
315315

316316

317317
# TOTO (Zhibo Zhang): Expand the test cases of general convolution and revise

0 commit comments

Comments
 (0)