08 2024 档案
摘要:They quantize 256^3 RGB values to a small number (such as 512) of quantized color values. The indices of quantized pixels are used as tokens for the i
阅读全文
摘要:1.如何基于图片生成patch_embedding? 方法一: - 基于pytorch unfold的API来将图片进行分块,也就是模仿卷积的思路,设置kernel_size=stride=patch_size,得到分块后的图片 - 得到格式为[bs, num_patch, patch_depth]
阅读全文
摘要:import torch import torch.nn as nn import torch.nn.functional as F from einops import rearrange, repeat from einops.layers.torch import Rearrange clas
阅读全文