使用爱因斯坦标记法操作张量

last modify

核心操作

以下示例均基于 einops 库进行演示;

einops: Deep learning operations reinvented (for pytorch, tensorflow, jax and others)

维度变换 einops.rearrange

更多示例见 docstring

综合示例:image2patch

复制 eioops.repeat

更多示例见 docstring

归约 einops.reduce

更多示例见 docstring

  • 支持的归约方法:('min', 'max', 'sum', 'mean', 'prod')

Last updated