x: (N, L, patch_size) imgs: (N, 1, num_voxels)
(x, patch_size)
| 113 | return x |
| 114 | |
| 115 | def unpatchify(x, patch_size): |
| 116 | """ |
| 117 | x: (N, L, patch_size) |
| 118 | imgs: (N, 1, num_voxels) |
| 119 | """ |
| 120 | p = patch_size |
| 121 | h = x.shape[1] |
| 122 | |
| 123 | imgs = x.reshape(shape=(x.shape[0], 1, h * p)) |
| 124 | return imgs |
nothing calls this directly
no outgoing calls
no test coverage detected