[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-dgasmith--opt_einsum":3,"tool-dgasmith--opt_einsum":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",144730,2,"2026-04-07T23:26:32",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107888,"2026-04-06T11:32:50",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":10,"last_commit_at":59,"category_tags":60,"status":17},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,"2026-04-06T11:19:32",[35,15,13,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":76,"owner_company":77,"owner_location":78,"owner_email":79,"owner_twitter":80,"owner_website":81,"owner_url":82,"languages":83,"stars":96,"forks":97,"last_commit_at":98,"license":99,"difficulty_score":91,"env_os":100,"env_gpu":101,"env_ram":102,"env_deps":103,"category_tags":114,"github_topics":115,"view_count":32,"oss_zip_url":80,"oss_zip_packed_at":80,"status":17,"created_at":123,"updated_at":124,"faqs":125,"releases":153},5403,"dgasmith\u002Fopt_einsum","opt_einsum","⚡️Optimizing einsum functions in NumPy, Tensorflow, Dask, and more with contraction order optimization.","opt_einsum 是一款专为加速张量运算而设计的开源优化库。在深度学习、量子化学及物理模拟等领域，开发者常需使用 `einsum` 函数执行复杂的张量收缩操作。然而，当涉及多个大型张量时，默认的运算顺序往往效率低下，导致计算耗时剧增。opt_einsum 的核心价值在于它能智能分析表达式，自动寻找并执行最优的“收缩路径”，从而将原本可能需要数分钟的计算缩短至毫秒级，性能提升可达数千倍。\n\n该工具不仅支持 NumPy，还无缝兼容 TensorFlow、PyTorch、JAX、Dask 等多种主流后端框架，甚至能自动调用 GPU 加速（如 cuBLAS）或处理稀疏矩阵。其独特亮点在于提供了高级功能，允许用户检查具体的优化路径、复用已编译的表达式以进一步提速，并能轻松应对包含数百个张量的超大规模运算场景。事实上，许多知名科学计算库内部的 `einsum` 优化算法正是源自于此。\n\nopt_einsum 非常适合从事高性能计算的研究人员、算法工程师以及需要处理高维数据运算的开发者。只需将代码中的标准 `einsum` 调用替换为 opt_einsum，即可在不改变原有逻辑的前提下，显著降低","opt_einsum 是一款专为加速张量运算而设计的开源优化库。在深度学习、量子化学及物理模拟等领域，开发者常需使用 `einsum` 函数执行复杂的张量收缩操作。然而，当涉及多个大型张量时，默认的运算顺序往往效率低下，导致计算耗时剧增。opt_einsum 的核心价值在于它能智能分析表达式，自动寻找并执行最优的“收缩路径”，从而将原本可能需要数分钟的计算缩短至毫秒级，性能提升可达数千倍。\n\n该工具不仅支持 NumPy，还无缝兼容 TensorFlow、PyTorch、JAX、Dask 等多种主流后端框架，甚至能自动调用 GPU 加速（如 cuBLAS）或处理稀疏矩阵。其独特亮点在于提供了高级功能，允许用户检查具体的优化路径、复用已编译的表达式以进一步提速，并能轻松应对包含数百个张量的超大规模运算场景。事实上，许多知名科学计算库内部的 `einsum` 优化算法正是源自于此。\n\nopt_einsum 非常适合从事高性能计算的研究人员、算法工程师以及需要处理高维数据运算的开发者。只需将代码中的标准 `einsum` 调用替换为 opt_einsum，即可在不改变原有逻辑的前提下，显著降低计算成本，让复杂模型训练与数据分析更加高效流畅。","# Optimized Einsum\n\n[![Tests](https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Factions\u002Fworkflows\u002FTests.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Factions\u002Fworkflows\u002FTests.yml)\n[![codecov](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fdgasmith\u002Fopt_einsum\u002Fbranch\u002Fmaster\u002Fgraph\u002Fbadge.svg)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fdgasmith\u002Fopt_einsum)\n[![Anaconda-Server Badge](https:\u002F\u002Fanaconda.org\u002Fconda-forge\u002Fopt_einsum\u002Fbadges\u002Fversion.svg)](https:\u002F\u002Fanaconda.org\u002Fconda-forge\u002Fopt_einsum)\n[![PyPI](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fopt_einsum.svg)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fopt-einsum\u002F#description)\n[![PyPIStats](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fdm\u002Fopt_einsum)](https:\u002F\u002Fpypistats.org\u002Fpackages\u002Fopt-einsum)\n[![Documentation Status](https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Factions\u002Fworkflows\u002FDocs.yaml\u002Fbadge.svg)](https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002F)\n[![DOI](https:\u002F\u002Fjoss.theoj.org\u002Fpapers\u002F10.21105\u002Fjoss.00753\u002Fstatus.svg)](https:\u002F\u002Fdoi.org\u002F10.21105\u002Fjoss.00753)\n\n## Optimized Einsum: A tensor contraction order optimizer\n\nOptimized einsum can significantly reduce the overall execution time of einsum-like expressions (e.g.,\n[`np.einsum`](https:\u002F\u002Fdocs.scipy.org\u002Fdoc\u002Fnumpy\u002Freference\u002Fgenerated\u002Fnumpy.einsum.html),\n[`dask.array.einsum`](https:\u002F\u002Fdocs.dask.org\u002Fen\u002Flatest\u002Farray-api.html#dask.array.einsum),\n[`pytorch.einsum`](https:\u002F\u002Fpytorch.org\u002Fdocs\u002Fstable\u002Ftorch.html#torch.einsum),\n[`tensorflow.einsum`](https:\u002F\u002Fwww.tensorflow.org\u002Fapi_docs\u002Fpython\u002Ftf\u002Feinsum),\n)\nby optimizing the expression's contraction order and dispatching many\noperations to canonical BLAS, cuBLAS, or other specialized routines.\n\nOptimized\neinsum is agnostic to the backend and can handle NumPy, Dask, PyTorch,\nTensorflow, CuPy, Sparse, Theano, JAX, and Autograd arrays as well as potentially\nany library which conforms to a standard API. See the\n[**documentation**](https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002F) for more\ninformation.\n\n## Example usage\n\nThe [`opt_einsum.contract`](https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002Fapi_reference#opt_einsumcontract)\nfunction can often act as a drop-in replacement for `einsum`\nfunctions without further changes to the code while providing superior performance.\nHere, a tensor contraction is performed with and without optimization:\n\n```python\nimport numpy as np\nfrom opt_einsum import contract\n\nN = 10\nC = np.random.rand(N, N)\nI = np.random.rand(N, N, N, N)\n\n%timeit np.einsum('pi,qj,ijkl,rk,sl->pqrs', C, C, I, C, C)\n1 loops, best of 3: 934 ms per loop\n\n%timeit contract('pi,qj,ijkl,rk,sl->pqrs', C, C, I, C, C)\n1000 loops, best of 3: 324 us per loop\n```\n\nIn this particular example, we see a ~3000x performance improvement which is\nnot uncommon when compared against unoptimized contractions. See the [backend\nexamples](https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002Fgetting_started\u002Fbackends)\nfor more information on using other backends.\n\n## Features\n\nThe algorithms found in this repository often power the `einsum` optimizations\nin many of the above projects. For example, the optimization of `np.einsum`\nhas been passed upstream and most of the same features that can be found in\nthis repository can be enabled with `np.einsum(..., optimize=True)`. However,\nthis repository often has more up to date algorithms for complex contractions.\n\nThe following capabilities are enabled by `opt_einsum`:\n\n* Inspect [detailed information](https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002Fpaths\u002Fintroduction) about the path chosen.\n* Perform contractions with [numerous backends](https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002Fgetting_started\u002Fbackends), including on the GPU and with libraries such as [TensorFlow](https:\u002F\u002Fwww.tensorflow.org) and [PyTorch](https:\u002F\u002Fpytorch.org).\n* Generate [reusable expressions](https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002Fgetting_started\u002Freusing_paths), potentially with [constant tensors](https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002Fgetting_started\u002Freusing_paths#specifying-constants), that can be compiled for greater performance.\n* Use an arbitrary number of indices to find contractions for [hundreds or even thousands of tensors](https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002Fexamples\u002Flarge_expr_with_greedy).\n* Share [intermediate computations](https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002Fgetting_started\u002Fsharing_intermediates) among multiple contractions.\n* Compute gradients of tensor contractions using [autograd](https:\u002F\u002Fgithub.com\u002FHIPS\u002Fautograd) or [jax](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fjax)\n\nPlease see the [documentation](https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002Findex) for more features!\n\n## Installation\n\n`opt_einsum` can be installed via pip:\n\n```bash\npip install opt_einsum\n```\n\nor with [uv](https:\u002F\u002Fgithub.com\u002Fastral-sh\u002Fuv):\n\n```bash\nuv pip install opt_einsum\n```\n\nIt is also available on conda-forge: `conda install opt_einsum -c conda-forge`.\n\nFor development, clone the repository and install with optional extras:\n\n```bash\nuv pip install -e \".[dev]\"\n```\n\nSee the installation [documentation](https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002Fgetting_started\u002Finstall) for further methods.\n\n## Citation\n\nIf this code has benefited your research, please support us by citing:\n\nDaniel G. A. Smith and Johnnie Gray, opt_einsum - A Python package for optimizing contraction order for einsum-like expressions. *Journal of Open Source Software*, **2018**, 3(26), 753\n\nDOI: \u003Chttps:\u002F\u002Fdoi.org\u002F10.21105\u002Fjoss.00753>\n\n## Contributing\n\nAll contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome.\n\nA detailed overview on how to contribute can be found in the [contributing guide](https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Fblob\u002Fmaster\u002F.github\u002FCONTRIBUTING.md).\n","# 优化的 Einsum\n\n[![测试](https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Factions\u002Fworkflows\u002FTests.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Factions\u002Fworkflows\u002FTests.yml)\n[![codecov](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fdgasmith\u002Fopt_einsum\u002Fbranch\u002Fmaster\u002Fgraph\u002Fbadge.svg)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fdgasmith\u002Fopt_einsum)\n[![Anaconda-Server Badge](https:\u002F\u002Fanaconda.org\u002Fconda-forge\u002Fopt_einsum\u002Fbadges\u002Fversion.svg)](https:\u002F\u002Fanaconda.org\u002Fconda-forge\u002Fopt_einsum)\n[![PyPI](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fopt_einsum.svg)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fopt-einsum\u002F#description)\n[![PyPIStats](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fdm\u002Fopt_einsum)](https:\u002F\u002Fpypistats.org\u002Fpackages\u002Fopt-einsum)\n[![文档状态](https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Factions\u002Fworkflows\u002FDocs.yaml\u002Fbadge.svg)](https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002F)\n[![DOI](https:\u002F\u002Fjoss.theoj.org\u002Fpapers\u002F10.21105\u002Fjoss.00753\u002Fstatus.svg)](https:\u002F\u002Fdoi.org\u002F10.21105\u002Fjoss.00753)\n\n## 优化的 Einsum：张量收缩顺序优化器\n\n优化的 einsum 可以通过优化表达式的收缩顺序，并将许多操作分派到标准 BLAS、cuBLAS 或其他专用例程中，从而显著减少类似 einsum 的表达式（例如，\n[`np.einsum`](https:\u002F\u002Fdocs.scipy.org\u002Fdoc\u002Fnumpy\u002Freference\u002Fgenerated\u002Fnumpy.einsum.html)、\n[`dask.array.einsum`](https:\u002F\u002Fdocs.dask.org\u002Fen\u002Flatest\u002Farray-api.html#dask.array.einsum)、\n[`pytorch.einsum`](https:\u002F\u002Fpytorch.org\u002Fdocs\u002Fstable\u002Ftorch.html#torch.einsum)、\n[`tensorflow.einsum`](https:\u002F\u002Fwww.tensorflow.org\u002Fapi_docs\u002Fpython\u002Ftf\u002Feinsum)）\n的整体执行时间。\n\n优化的 einsum 对后端无关，可以处理 NumPy、Dask、PyTorch、TensorFlow、CuPy、Sparse、Theano、JAX 和 Autograd 数组，以及任何符合标准 API 的库。更多信息请参阅\n[**文档**](https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002F)。\n\n## 使用示例\n\n`[opt_einsum.contract](https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002Fapi_reference#opt_einsumcontract)` 函数通常可以直接替代 `einsum` 函数，而无需对代码进行进一步修改，同时提供更优的性能。以下展示了在有优化和无优化的情况下进行张量收缩的结果：\n\n```python\nimport numpy as np\nfrom opt_einsum import contract\n\nN = 10\nC = np.random.rand(N, N)\nI = np.random.rand(N, N, N, N)\n\n%timeit np.einsum('pi,qj,ijkl,rk,sl->pqrs', C, C, I, C, C)\n1 循环，最佳 3 次：每循环 934 毫秒\n\n%timeit contract('pi,qj,ijkl,rk,sl->pqrs', C, C, I, C, C)\n1000 循环，最佳 3 次：每循环 324 微秒\n```\n\n在这个特定的例子中，我们看到了约 3000 倍的性能提升，这在与未优化的收缩相比并不罕见。更多关于使用其他后端的信息，请参阅 [后端示例](https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002Fgetting_started\u002Fbackends)。\n\n## 特性\n\n本仓库中的算法通常为上述许多项目中的 `einsum` 优化提供支持。例如，`np.einsum` 的优化功能已被合并到上游，因此本仓库中的大多数特性都可以通过 `np.einsum(..., optimize=True)` 来启用。然而，本仓库通常包含针对复杂收缩的更最新算法。\n\n`opt_einsum` 提供以下功能：\n\n* 检查所选路径的[详细信息](https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002Fpaths\u002Fintroduction)。\n* 使用[多种后端](https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002Fgetting_started\u002Fbackends)进行收缩，包括在 GPU 上以及使用 [TensorFlow](https:\u002F\u002Fwww.tensorflow.org) 和 [PyTorch](https:\u002F\u002Fpytorch.org) 等库。\n* 生成[可重用的表达式](https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002Fgetting_started\u002Freusing_paths)，甚至可以使用[常量张量](https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002Fgetting_started\u002Freusing_paths#specifying-constants)，以便编译以获得更高的性能。\n* 使用任意数量的索引为[数百甚至数千个张量](https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002Fexamples\u002Flarge_expr_with_greedy)找到收缩方式。\n* 在多个收缩之间共享[中间计算](https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002Fgetting_started\u002Fsharing_intermediates)。\n* 使用 [autograd](https:\u002F\u002Fgithub.com\u002FHIPS\u002Fautograd) 或 [jax](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fjax) 计算张量收缩的梯度。\n\n更多功能请参阅 [文档](https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002Findex)！\n\n## 安装\n\n可以通过 pip 安装 `opt_einsum`：\n\n```bash\npip install opt_einsum\n```\n\n或者使用 [uv](https:\u002F\u002Fgithub.com\u002Fastral-sh\u002Fuv)：\n\n```bash\nuv pip install opt_einsum\n```\n\n它也可以通过 conda-forge 获取：`conda install opt_einsum -c conda-forge`。\n\n对于开发，克隆仓库并安装带有可选依赖项：\n\n```bash\nuv pip install -e \".[dev]\"\n```\n\n更多安装方法请参阅 [安装文档](https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002Fgetting_started\u002Finstall)。\n\n## 引用\n\n如果此代码对您的研究有所帮助，请通过引用以下内容来支持我们：\n\nDaniel G. A. Smith 和 Johnnie Gray，opt_einsum - 用于优化类似 einsum 表达式收缩顺序的 Python 包。《开源软件期刊》，**2018** 年，第 3 卷，第 26 期，第 753 号\n\nDOI：\u003Chttps:\u002F\u002Fdoi.org\u002F10.21105\u002Fjoss.00753>\n\n## 贡献\n\n我们欢迎所有贡献、错误报告、修复、文档改进、功能增强和创意想法。\n\n有关如何贡献的详细说明，请参阅 [贡献指南](https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Fblob\u002Fmaster\u002F.github\u002FCONTRIBUTING.md)。","# opt_einsum 快速上手指南\n\n`opt_einsum` 是一个用于优化爱因斯坦求和约定（einsum）表达式收缩顺序的 Python 库。它能显著减少张量运算的执行时间，并自动将操作分发到高效的 BLAS、cuBLAS 或其他专用例程中。该库与后端无关，支持 NumPy、PyTorch、TensorFlow、JAX、Dask 等多种框架。\n\n## 环境准备\n\n*   **系统要求**：支持 Windows、macOS 和 Linux。\n*   **Python 版本**：建议 Python 3.8 及以上版本。\n*   **前置依赖**：\n    *   必须安装 `numpy`。\n    *   若需使用 GPU 加速或其他框架（如 PyTorch, TensorFlow），请预先安装对应的库（如 `torch`, `tensorflow`, `cupy` 等）。\n\n## 安装步骤\n\n推荐使用国内镜像源以加快下载速度。\n\n### 方法一：使用 pip 安装（推荐）\n\n使用阿里云或清华大学镜像源进行安装：\n\n```bash\npip install opt_einsum -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n或者使用阿里云镜像：\n\n```bash\npip install opt_einsum -i https:\u002F\u002Fmirrors.aliyun.com\u002Fpypi\u002Fsimple\u002F\n```\n\n### 方法二：使用 conda 安装\n\n如果你使用 Anaconda 或 Miniconda：\n\n```bash\nconda install opt_einsum -c conda-forge\n```\n*(注：conda 默认源在国内访问较慢，建议配置清华或中科大 conda 镜像源)*\n\n## 基本使用\n\n`opt_einsum.contract` 函数通常可以直接替代标准的 `einsum` 函数，无需修改现有代码逻辑即可获得性能提升。\n\n### 最简单的使用示例\n\n以下示例展示了如何使用 `opt_einsum` 执行张量收缩，并与原生 `np.einsum` 进行对比：\n\n```python\nimport numpy as np\nfrom opt_einsum import contract\n\n# 准备数据\nN = 10\nC = np.random.rand(N, N)\nI = np.random.rand(N, N, N, N)\n\n# 原生 NumPy einsum (未优化)\n# %timeit np.einsum('pi,qj,ijkl,rk,sl->pqrs', C, C, I, C, C)\n# 结果示例：934 ms per loop\n\n# 使用 opt_einsum (自动优化收缩顺序)\nresult = contract('pi,qj,ijkl,rk,sl->pqrs', C, C, I, C, C)\n\n# 在 Jupyter 环境中测试性能对比\n# %timeit contract('pi,qj,ijkl,rk,sl->pqrs', C, C, I, C, C)\n# 结果示例：324 us per loop (性能提升约 3000 倍)\n```\n\n### 关键点说明\n*   **无缝替换**：只需将 `np.einsum` 替换为 `contract`，传入相同的下标字符串和张量数组即可。\n*   **自动优化**：库会自动计算最优的收缩路径，对于复杂的多个张量相乘，性能提升尤为明显。\n*   **多后端支持**：如果你传入的是 PyTorch Tensor 或 TensorFlow Tensor，`contract` 会自动识别并在相应后端上执行优化后的运算。","某量子化学研究团队在开发分子电子密度计算程序时，需要处理涉及数百个高维张量的复杂收缩运算，以模拟大型有机分子的电子相互作用。\n\n### 没有 opt_einsum 时\n- 程序依赖原生 `np.einsum` 按默认顺序执行运算，面对多张量链式收缩时，中间生成的临时数组体积爆炸，导致内存迅速耗尽。\n- 单次分子构型能量计算耗时高达数十分钟，研究人员无法在合理时间内完成对数千种构型的筛选与验证。\n- 开发者不得不手动推导最优收缩路径并硬编码到脚本中，不仅极易出错，且每当分子结构变化导致张量维度改变时，代码需重新调整。\n- 即使拥有高性能 GPU 集群，由于计算瓶颈在于低效的 CPU 内存搬运而非算力，硬件加速优势完全无法发挥。\n\n### 使用 opt_einsum 后\n- opt_einsum 自动分析表达式并生成全局最优收缩路径，将中间临时数组的规模降低数个数量级，彻底消除内存溢出风险。\n- 同样的计算任务运行时间从几十分钟缩短至秒级（官方案例显示可达 3000 倍加速），使得大规模高通量筛选成为可能。\n- 只需将 `np.einsum` 替换为 `opt_einsum.contract`，算法即可自适应不同维度的输入，无需人工干预路径规划，大幅降低维护成本。\n- 工具自动将密集矩阵乘法部分分发至 BLAS、cuBLAS 等底层高效库，充分释放 CPU 多核与 GPU 的并行计算潜力。\n\nopt_einsum 通过智能重排张量收缩顺序，将原本不可行的超大规模科学计算转化为高效、稳定的常规任务。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fdgasmith_opt_einsum_11947163.png","dgasmith","Daniel Smith","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fdgasmith_0bf594ff.jpg","Twitter: @dga_smith","CTO @ Achira","Boston, MA","dgasmith@icloud.com",null,"achira.ai","https:\u002F\u002Fgithub.com\u002Fdgasmith",[84,88,92],{"name":85,"color":86,"percentage":87},"Python","#3572A5",98.8,{"name":89,"color":90,"percentage":91},"TeX","#3D6117",1,{"name":93,"color":94,"percentage":95},"Makefile","#427819",0.2,977,74,"2026-03-30T05:52:25","MIT","","非必需。支持通过 CuPy、PyTorch、TensorFlow 等后端在 GPU 上运行，具体显卡型号、显存及 CUDA 版本取决于所选后端库的要求。","未说明",{"notes":104,"python":102,"dependencies":105},"该工具是后端的无关优化器，本身不强制依赖特定深度学习框架，但需安装对应的后端库（如 NumPy、PyTorch、JAX 等）才能执行计算。可通过 pip 或 conda 安装。对于复杂收缩路径，算法可能比标准库（如 np.einsum optimize=True）更新。",[106,107,108,109,110,111,112,113],"numpy","dask","torch","tensorflow","cupy","sparse","jax","autograd",[14],[116,117,118,119,120,121,122],"python","tensor","contraction","gpu-acceleration","performance","einsum","tensor-contraction","2026-03-27T02:49:30.150509","2026-04-08T13:59:07.455017",[126,131,136,141,145,149],{"id":127,"question_zh":128,"answer_zh":129,"source_url":130},24510,"为什么 'optimal' 路径有时比 'auto' 或 'greedy' 路径产生更大的中间张量或更多的计算量？","这通常是因为 'optimal' 算法在处理具有相同索引的中间张量和初始张量时，未能优先执行哈达玛积（Hadamard products，即元素级乘法）。相比之下，'auto' 或 'greedy' 策略可能会更智能地先处理这些操作。解决方案包括：1. 在最优算法中强制贪婪地执行所有哈达玛积；2. 或者考虑将 'optimal' 方法指向更高效的 'dp'（动态规划）优化器，并对其进行微调以处理小规模情况。","https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Fissues\u002F99",{"id":132,"question_zh":133,"answer_zh":134,"source_url":135},24511,"如何在多个收缩操作中复用中间结果（公共子表达式消除）以减少计算量？","可以使用上下文管理器 `oe.shared_intermediaries()` 来缓存中间结果。在第一个代码块中执行收缩操作会自动缓存结果，随后的代码块若传入相同的缓存对象，即可直接复用之前的中间张量（通过对象的 `id` 进行哈希匹配），从而避免重复计算。\n示例代码：\n```python\nwith oe.shared_intermediaries() as cache:\n    # 执行一些收缩操作，结果被缓存\n    oe.contract(...)\n\n# 执行其他非缓存操作\n\nwith oe.shared_intermediaries(cache):\n    # 再次使用相同的缓存，复用之前的中间结果\n    oe.contract(...)\n```","https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Fissues\u002F9",{"id":137,"question_zh":138,"answer_zh":139,"source_url":140},24512,"对于量子计算模拟等对内存敏感的场景，如何找到比标准贪婪算法更优的收缩路径？","可以采用“随机贪婪”策略（Random Greedy）。具体做法是在成本目标函数中引入随机扰动（例如对每个成本随机调整 ±5%），然后运行多次该算法。由于每次运行会生成不同的路径，最后只需从所有生成的路径中选择成本（如最大张量秩）最低的那一个。这种方法往往能以极低的额外计算代价，找到比确定性贪婪算法好得多的路径，显著降低内存需求。","https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Fissues\u002F63",{"id":142,"question_zh":143,"answer_zh":144,"source_url":140},24513,"如何处理包含额外“批处理维度”（batch dimension）的爱因斯坦求和约定问题？","可以通过问题转换器（problem transformer）来处理。例如，将原始的收缩方程 `ab,bc,cd->ad` 转换为包含批处理维度 `z` 的形式：`abz,bcz,cdz->adz`（输出也包含批次）或 `abz,bcz,cdz->ad`（输出不包含批次，即对批次进行归约）。这种转换允许在不改变核心逻辑的情况下处理批量数据。",{"id":146,"question_zh":147,"answer_zh":148,"source_url":140},24514,"当同一个方程需要独立重复多次（例如并行处理多个相同结构的问题）时，该如何构造输入？","可以通过复制方程来构造输入。例如，将单个方程 `ab,bc,ca->` 复制多次，构造为 `ab,bc,ca,de,ef,fd,gh,hi,ih->`（假设有 3 个副本，索引名称需唯一或使用虚拟索引）。如果结合批处理维度使用，这种模式在处理大量独立同构问题时非常有效。",{"id":150,"question_zh":151,"answer_zh":152,"source_url":135},24515,"在实现中间结果复用时，如何正确处理张量顺序不同但内容相同的情况（例如 `ab,bc` 与 `bc,ab`）？","在生成缓存键（key）时，应对输入张量应用标准化排序。一个简单的策略是比较张量的对象 ID，确保键的生成顺序一致。例如，使用 `id(x) > id(y)` 作为判断条件，如果第二个张量的 ID 小于第一个，则交换它们在键中的位置。这样可以确保无论用户输入的顺序如何，相同的张量组合都能命中同一个缓存键。",[154,159,164,169,174,179,184,189,194,199,204,209,214,219,224,229,234,239,244,249],{"id":155,"version":156,"summary_zh":157,"released_at":158},154109,"v3.4.0","## 3.4.0 \u002F 2024-09-26\n\n`opt_einsum` 已将 NumPy 从依赖项中移除，从而支持更灵活的安装方式。此外，代码库中添加了类型注解，并对文档进行了全面升级，现使用 MkDocs 打造，详情请见：https:\u002F\u002Fdgasmith.github.io\u002Fopt_einsum\u002F\n\n**新特性**\n\n - [\\#160](https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Fpull\u002F160) 将文档迁移到 MkDocs Material，并托管于 GitHub Pages。\n - [\\#161](https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Fpull\u002F161) 在代码库中添加了 Python 类型注解。\n - [\\#204](https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Fpull\u002F204) 移除了 NumPy 的硬性依赖。\n\n**改进**\n\n- [\\#154](https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Fpull\u002F154) 防止在为 `dp` 算法设置极低的 `memory_limit` 时出现无限递归错误。\n- [\\#155](https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Fpull\u002F155) 为文档字符串添加了 flake8 拼写检查。\n- [\\#159](https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Fpull\u002F159) 迁移到 GitHub Actions 进行持续集成。\n- [\\#174](https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Fpull\u002F174) 防止动态路径中浮点数的重复收缩。\n- [\\#196](https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Fpull\u002F196) 允许 `backend=None`，其效果等同于 `backend='auto'`。\n- [\\#208](https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Fpull\u002F208) 为兼容 Python 3.12，将配置解析器由 `SafeConfigParser` 改为 `ConfigParser`。\n- [\\#228](https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Fpull\u002F228) 现在 `backend='jaxlib'` 是 `jax` 库的别名。\n- [\\#237](https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Fpull\u002F237) 改用 `ruff` 进行格式化和 linting。\n- [\\#238](https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Fpull\u002F238) 从 `contract` 函数中移除了特定于 NumPy 的关键字参数，改用 `**kwargs`。\n\n**Bug 修复**\n\n- [\\#195](https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Fpull\u002F195) 修复了一个 bug：当仅涉及标量收缩时，`dp` 算法无法正常工作。\n- [\\#200](https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Fpull\u002F200) 修复了一个 bug：`parse_einsum_input` 未能正确处理仅基于形状的收缩。\n- [\\#222](https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Fpull\u002F222) 修复了 `parse_einsum_input` 中的一个错误：当输出下标被多次指定时，该问题未被正确捕获。\n- [\\#229](https:\u002F\u002Fgithub.com\u002Fdgasmith\u002Fopt_einsum\u002Fpull\u002F229) 修复了一个 bug：当 `PathInfo` 中的收缩列表为空时，会导致错误。","2024-09-26T13:40:39",{"id":160,"version":161,"summary_zh":162,"released_at":163},154110,"v3.3.0","添加了一个用于在任意 Python 对象上进行优化缩并的 ``object`` 后端。\n\n# 新特性\n - (#145) 添加了一个基于 ``object`` 的后端，使得可以在诸如 SymPy 符号之类的任意对象上使用 ``contract(backend='object')``。\n\n# 改进\n - (#140) 当无法找到请求的 ``contract`` 后端时，提供更友好的错误信息。\n - (#141) 为 RandomOptimizers 添加了一项检查，以确保不会意外地将对象重复用于不同的缩并操作。\n - (#149) 将 ``contract_path`` 输出中的 ``remaining`` 类别限制为最多显示 20 个张量，以避免因内存需求呈二次方增长以及大型缩并操作导致打印行数过多而引发的问题。","2020-07-19T22:38:02",{"id":165,"version":166,"summary_zh":167,"released_at":168},154111,"v3.2.1","# 错误修复\n- (#131) 修复了一个爱因斯坦求和约定下下标错误的提示信息，使其指向正确的值。\n- (#135) 类似于其他后端，对 JAX 进行惰性加载。","2020-04-15T14:52:11",{"id":170,"version":171,"summary_zh":172,"released_at":173},154112,"v3.2.0","对 ``dp`` 路径的小修复，以及对新 Mars 后端的支持。\n\n# 新特性\n - (#109) 增加了对 Mars 后端的支持。\n\n# 功能增强\n - (#110) 新增了 ``auto-hq`` 和 ``'random-greedy-128'`` 路径。\n - (#119) 修复了 ``dp`` 路径中的多个边界情况。\n\n# Bug 修复\n - (#127) 修复了一个问题：尽管 `opt_einsum` 声明的最低 Python 版本是 3.5，但实际使用中却需要 Python 3.6 的特性。","2020-03-03T00:32:28",{"id":175,"version":176,"summary_zh":177,"released_at":178},154113,"v3.1.0","向路径工具集添加了一种新的动态规划算法。","2019-09-30T20:53:44",{"id":180,"version":181,"summary_zh":182,"released_at":183},154114,"v3.0.1","修改 `setup.py`，正确声明 `opt_einsum` 需要 Python 3.5 或更高版本。此举将有效影响 PyPI 及其他 pip 镜像源的下载。为防止进一步问题，v3.0.0 版本将从 PyPI 上移除。","2019-08-22T13:10:10",{"id":185,"version":186,"summary_zh":187,"released_at":188},154115,"v3.0.0","本次发布将 `opt_einsum` 改造为后端无关，同时新增对 Jax 和 Autograd 等更多后端的支持。已弃用对 Python 2.7 的支持，Python 3.5 将成为新的最低版本要求，并采纳与 NumPy 相当的 Python 废弃策略。\n\n# 新特性\n- (#78) 实现了一种新的随机优化器，该优化器使用玻尔兹曼加权机制，在类似贪心的方案下探索近似最优路径的替代方案。这在仅带来线性时间开销的情况下，显著提升了路径性能。\n- (#78) 实现了一个新的 `PathOptimizer` 类，为构建新型优化器提供框架。例如，现在可以在贪心形式中自定义代价函数，从而无需大量额外代码即可构建自定义优化器。\n- (#81) 为 `contract` 函数实现了 `backend=\"auto\"` 关键字，可根据张量合约中提供的张量自动检测并选择合适的后端。\n- (#88) 新增了对 Autograd 和 Jax 的支持。\n- (#96) 废弃 Python 2 相关功能，并进行了开发运维方面的改进。\n\n# 功能增强\n- (#84) `contract_path` 函数现在可以接受形状元组，而不再局限于完整的张量。\n- (#84) `contract_path` 自动路径算法决策逻辑已被重构为一个独立函数。","2019-08-12T17:46:31",{"id":190,"version":191,"summary_zh":192,"released_at":193},154116,"v2.3.2","## 错误修复：\n\n- (#77) 修复了 PyTorch 1.0 版本 JIT 张量形状相关的问题。","2018-12-09T20:33:33",{"id":195,"version":196,"summary_zh":197,"released_at":198},154117,"v2.3.1","## 错误修复：\n\n- 对发布流程进行了小幅调整。","2018-12-01T16:23:09",{"id":200,"version":201,"summary_zh":202,"released_at":203},154118,"v2.3.0","本次发布主要聚焦于扩展可用的路径技术集，以在优化4–20个张量时提供更优的优化特性，同时缩短为50–200+个张量寻找最优路径所需的时间。更多信息请参阅路径概述。\n\n## 新特性：\n\n- (#60) 新增了一种贪心实现，对于200个张量的情况，其速度可提升多达两个数量级。\n- (#73) 增加了一种基于贪心思想的分支路径，用于剪枝最优探索空间，从而在次优成本下获得比纯贪心算法更好的路径。\n- (#73) 在 `opt_einsum.contract` 的 path 选项中新增了 `auto` 关键字。该关键字会自动选择执行时间小于1毫秒的最佳路径技术。\n\n## 功能增强：\n\n- (#61) 将 `opt_einsum.contract` 的 path 关键字调整为更贴近 NumPy 的优化方式。path 配置项将在未来被弃用。\n- (#61) `opt_einsum.contract_path` 现在返回一个 `opt_einsum.contract.PathInfo` 对象，可通过该对象查询路径的缩放因子、浮点运算次数以及中间结果。该对象的打印输出格式与之前保持一致。\n- (#61) 根据社区反馈，将默认的 memory_limit 设置为无限制。\n- (#66) 当使用包含 tensordot 功能的 Torch 版本时，Torch 后端现在将采用 tensordot 进行计算。\n- (#68) 在“交错输入”语法中，索引可以是任何可哈希对象。\n- (#74) 允许覆盖默认的转置操作，以便利用更高级的张量转置库。\n- (#73) 最优路径的计算速度现已显著提升。\n\n## Bug 修复：\n\n- (#72) 修复了“交错输入”语法，并添加了相关文档。","2018-12-01T15:37:15",{"id":205,"version":206,"summary_zh":207,"released_at":208},154119,"v2.2.0","New features:\r\n - (#48) Intermediates can now be shared between contractions, see [here](https:\u002F\u002Foptimized-einsum.readthedocs.io\u002Fen\u002Flatest\u002Fsharing_intermediates.html) for more details.\r\n - (#53) Intermediate caching is thread safe.\r\n\r\nEnhancements:\r\n - (#48) Expressions are now mapped to non-unicode index set so that unicode input is support for all backends.\r\n - (#58) Adds tensorflow and theano with shared intermediates.\r\n\r\nBug fixes:\r\n - (#41) PyTorch indices are mapped back to a small `a-z` subset valid for PyTorch's einsum implementation.","2018-08-29T22:05:01",{"id":210,"version":211,"summary_zh":212,"released_at":213},154120,"v2.1.3","Bug fixes:\r\n - Fixes unicode issue for large numbers of tensors in Python 2.7.\r\n - Fixes unicode install bug in `README.md`.","2018-08-23T22:13:03",{"id":215,"version":216,"summary_zh":217,"released_at":218},154121,"v2.1.2","Bug Fixes:\r\n- Ensures `versioneer.py` is in MANIFEST.in for a clean pip install.","2018-08-15T20:36:45",{"id":220,"version":221,"summary_zh":222,"released_at":223},154122,"v2.1.1","Bug Fixes:\r\n- Minor tweak to release procedure.","2018-08-14T22:03:53",{"id":225,"version":226,"summary_zh":227,"released_at":228},154123,"v2.1.0","`opt_einsum` continues to improve its support for additional backends beyond NumPy with PyTorch.\r\n\r\nWe have also published the opt_einsum package in the Journal of Open Source Software. If you use this package in your work, please consider [citing us](https:\u002F\u002Fdoi.org\u002F10.21105\u002Fjoss.00753)!\r\n\r\nNew features:\r\n\r\n- PyTorch backend support\r\n- Tensorflow eager-mode execution backend support\r\n\r\nEnhancements:\r\n\r\n- Intermediate tensordot-like expressions are now ordered to avoid transposes.\r\n- CI now uses conda backend to better support GPU and tensor libraries.\r\n- Now accepts arbitrary unicode indices rather than a subset.\r\n- New auto path option which switches between optimal and greedy at four tensors.\r\n\r\nBug fixes:\r\n\r\n- Fixed issue where broadcast indices were incorrectly locked out of tensordot-like evaluations even after their dimension was broadcast.","2018-08-14T21:09:48",{"id":230,"version":231,"summary_zh":232,"released_at":233},154124,"v2.0.1","`opt_einsum` is a powerful tensor contraction order optimizer for NumPy and related ecosystems.\r\n\r\n# New Features\r\n- Allows unlimited Unicode indices.\r\n- Adds a Journal of Open-Source Software paper.\r\n- Minor documentation improvements.","2018-06-28T20:13:28",{"id":235,"version":236,"summary_zh":237,"released_at":238},154125,"v2.0.0","`opt_einsum` is a powerful tensor contraction order optimizer for NumPy and related ecosystems.\r\n\r\n# New Features\r\n- Expressions can be precompiled so that the expression optimization need not happen multiple times.\r\n- The `greedy` order optimization algorithm has been tuned to be able to handle hundreds of tensors in several seconds.\r\n- Input indices can now be unicode so that expressions can have many thousands of indices.\r\n- GPU and distributed computing backends have been added such as Dask, TensorFlow, CUPy, Theano, and Sparse.\r\n\r\n# Bug Fixes\r\n- A error effecting cases where opt_einsum mistook broadcasting operations for matrix multiply has been fixed.\r\n- Most error messages are now more expressive.\r\n","2018-05-17T13:49:03",{"id":240,"version":241,"summary_zh":242,"released_at":243},154126,"1.0","Official 1.0 release.\n\nEinsum is a very powerful function for contracting tensors of arbitrary dimension and index. However, it is only optimized to contract two terms at a time resulting in non-optimal scaling for contractions with many terms. Opt_einsum aims to fix this by optimizing the contraction order which can lead to arbitrarily large speed ups at the cost of additional intermediate tensors.\n\nOpt_einsum is also implemented into the `np.einsum` function as of NumPy v1.12.\n","2016-10-15T01:47:08",{"id":245,"version":246,"summary_zh":247,"released_at":248},154127,"v0.2.0","A large step towards to a full 1.0 release. BLAS usage is now automatically applied to all operations. Future releases will be more careful with regard to views and needless data copying.\n","2016-07-30T21:34:40",{"id":250,"version":251,"summary_zh":252,"released_at":253},154128,"v0.1.1","Adds Python 3 support in addition to installation through a `setup.py` command.\n","2016-03-23T14:13:38"]