This PR adds a new transpose_ layer to the Dlib deep learning framework.
The transpose_ layer performs 2D matrix transposition on each k-plane of a 4D tensor:
template <typename SUBNET>
using transpose = add_layer<transpose_, SUBNET>;
Usage example:
using net_type = loss_multiclass_log<
fc<number_of_classes,
transpose<
conv<16,5,5,2,2,input<matrix<float>>>
>>>;
This layer is useful for operations that require transposed feature maps, such as certain types of attention mechanisms or specialized convolution patterns.
This PR adds a new
transpose_
layer to the Dlib deep learning framework.The
transpose_
layer performs 2D matrix transposition on each k-plane of a 4D tensor:Usage example:
This layer is useful for operations that require transposed feature maps, such as certain types of attention mechanisms or specialized convolution patterns.