pyhgf.model.conv.spatial_reshape_adapter#

pyhgf.model.conv.spatial_reshape_adapter(height, width)[source]#

Build a frozen reshape between patch rows and the spatial layout.

Maps (batch, n_patches, C) to (batch, C, H, W) and back, converting the output of the per-patch network into the spatial layout that pooling and the next im2col_adapter() expect. A transpose followed by a reshape, with no learned content, so the backward is the inverse reshape.

Parameters:
Return type:

EquinoxAdapter