class_docstr: A patch embedding block, based on: "Dosovitskiy et al.,
  An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale <https://arxiv.org/abs/2010.11929>"
  
  Example::
  
      >>> from monai.networks.blocks import PatchEmbeddingBlock
      >>> PatchEmbeddingBlock(in_channels=4, img_size=32, patch_size=8, hidden_size=32, num_heads=4,
      >>>                     proj_type="conv", pos_embed_type="sincos")
class_docstr_tok: ["A","patch","embedding","block",",","based","on",":","``","Dosovitskiy","et","al.",",","An","Image","is","Worth","16x16","Words",":","Transformers","for","Image","Recognition","at","Scale","<","https",":","\/\/arxiv.org\/abs\/2010.11929",">","''","Example",":",":",">",">",">","from","monai.networks.blocks","import","PatchEmbeddingBlock",">",">",">","PatchEmbeddingBlock","(","in_channels=4",",","img_size=32",",","patch_size=8",",","hidden_size=32",",","num_heads=4",",",">",">",">","proj_type=","''","conv","''",",","pos_embed_type=","''","sincos","''",")"]
code: def forward(self, x):
      x = self.patch_embeddings(x)
      if self.proj_type == "conv":
          x = x.flatten(2).transpose(-1, -2)
      embeddings = x + self.position_embeddings
      embeddings = self.dropout(embeddings)
      return embeddings
  
imports: from __future__ import annotations
  from collections.abc import Sequence
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from torch.nn import LayerNorm
  from monai.networks.blocks.pos_embed_utils import build_sincos_position_embedding
  from monai.networks.layers import Conv, trunc_normal_
  from monai.utils import deprecated_arg, ensure_tuple_rep, optional_import
  from monai.utils.module import look_up_option
label_desc: Use image node_id 3 for calling the PatchEmbeddingBlock obj's underlying member method code with example usage: obj.forward(x) and returns: embeddings