Implement patch embedding (conv or unfold ++ linear) converting an image tensor to patch

Multimodal & Vision-Language Models1 / 3

Chapter 211 / 3

Multimodal & Vision-Language Models

Implement patch embedding (conv or unfold ++ linear) converting an image tensor to patch

Easy

Implement patch embedding (conv or unfold ++ linear) converting an image tensor to patch tokens.

Target interface
class PatchEmbed

Implement the function/class skeleton in the editor. Any correct approach is accepted.

Hints0 / 2
Reference solution
Your own code stays in the editor.