张量在内存中的存储(reshape/permute操作理解) 在阅读flux代码的时候,看到这段处理latent的代码有些懵逼,追根溯源就是自己对于pytorch Tensor数据组织的方式理解不透彻,因此写下这篇博客开云破雾: 1234567@staticmethoddef _pack_latents(latents, batch_size, num_channels_latents, height, width): latents = latent 2024-12-28