Skip to main content
100%

Gist 6bdb29f6cdeb680f0306

✓ Published0🌍 Public
Aaman-tiwari
Last edited Mar 15, 2016
Created on Mar 15, 2016

This example demonstrates a method for performing nearest-neighbor upsampling on a NumPy array using matrix multiplications, effectively doubling the spatial dimensions of the data. The visualization shows how the original input values are expanded by inserting repeated rows and columns through carefully constructed kernel matrices. The `unpool` function builds two tile-based kernels, `kernel_x` and `kernel_y`, and applies them via sequential `np.matmul` operations with transposes to correctly broadcast the expansion. This approach leverages linear algebra primitives from NumPy without explicit looping or image-specific libraries.

AI-generated description

Similar vizzes