[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-facebookresearch--theseus":3,"tool-facebookresearch--theseus":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},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,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},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 真正成长为懂上",140436,2,"2026-04-05T23:32:43",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":79,"owner_email":79,"owner_twitter":79,"owner_website":80,"owner_url":81,"languages":82,"stars":103,"forks":104,"last_commit_at":105,"license":106,"difficulty_score":107,"env_os":108,"env_gpu":109,"env_ram":110,"env_deps":111,"category_tags":120,"github_topics":121,"view_count":23,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":133,"updated_at":134,"faqs":135,"releases":165},3527,"facebookresearch\u002Ftheseus","theseus","A library for differentiable nonlinear optimization","Theseus 是由 Facebook Research 推出的开源库，专为在 PyTorch 中构建可微分的非线性优化层而设计。它主要解决了机器人学和计算机视觉领域中，如何将传统基于专家知识的优化算法与现代深度学习模型无缝融合的挑战。通过支持端到端的梯度计算，Theseus 让神经网络不仅能从最终任务损失中学习，还能利用优化器内置的归纳偏置（如物理约束或几何先验），从而构建出既具备数据驱动灵活性又符合领域逻辑的混合架构。\n\n这款工具非常适合从事机器人控制、状态估计、SLAM 或三维视觉研究的算法工程师与科研人员。如果你需要在深度网络中嵌入复杂的优化步骤，却不想从零开始推导繁琐的梯度公式，Theseus 提供了极佳的解决方案。其核心技术亮点在于丰富的算法支持，内置了高斯 - 牛顿、列文伯格 - 马夸尔特等二阶非线性优化器，以及针对稠密和稀疏矩阵的高效线性求解器（包括 GPU 加速版本）。同时，它采用与应用场景无关的通用接口，让用户能像搭积木一样轻松定制优化层，并将其灵活插入任意神经网络结构中，极大地提升了研发效率。","![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Ffacebookresearch_theseus_readme_ed4689cfc8dd.png)\n\n\u003Cp align=\"center\">\n    \u003C!-- CI -->\n    \u003Ca href=\"https:\u002F\u002Fcircleci.com\u002Fgh\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\">\n        \u003Cimg src=\"https:\u002F\u002Fcircleci.com\u002Fgh\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain.svg?style=svg\" alt=\"CircleCI\" height=\"20\">\n    \u003C\u002Fa>\n    \u003C!-- License -->\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002FLICENSE\">\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg\" alt=\"License\" height=\"20\">\n    \u003C\u002Fa>\n    \u003C!-- pypi -->\n    \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Ftheseus-ai\u002F\">\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Ftheseus-ai\" alt=\"pypi\"\n        heigh=\"20\">\n    \u003C!-- Downloads counter -->\n    \u003Ca href=\"https:\u002F\u002Fpepy.tech\u002Fproject\u002Ftheseus-ai\">\n        \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Ffacebookresearch_theseus_readme_b21f8868b907.png\" alt=\"PyPi Downloads\" height=\"20\">\n    \u003C\u002Fa>\n    \u003C!-- Python -->\n    \u003Ca href=\"https:\u002F\u002Fwww.python.org\u002Fdownloads\u002Frelease\u002F\">\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.8%20%7C%203.9%20%7C%203.10-blue.svg\" alt=\"Python\" height=\"20\">\n    \u003C\u002Fa>\n    \u003C!-- Pre-commit -->\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fpre-commit\u002Fpre-commit\">\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpre--commit-enabled-green?logo=pre-commit&logoColor=white\" alt=\"pre-commit\" height=\"20\">\n    \u003C\u002Fa>\n    \u003C!-- Black -->\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fpsf\u002Fblack\">\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcode%20style-black-000000.svg\" alt=\"black\" height=\"20\">\n    \u003C\u002Fa>\n    \u003C!-- PRs -->\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002FCONTRIBUTING.md\">\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPRs-welcome-green.svg\" alt=\"PRs\" height=\"20\">\n    \u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n    \u003Ci>A library for differentiable nonlinear optimization\u003C\u002Fi>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2207.09442\">Paper\u003C\u002Fa> •\n    \u003Ca href=\"https:\u002F\u002Fyoutu.be\u002FzIbPHXegNn8\">Video\u003C\u002Fa> •\n    \u003Ca href=\"https:\u002F\u002Fx.com\u002Fmukadammh\u002Fstatus\u002F1549773856738615297\">Twitter\u003C\u002Fa> •\n    \u003Ca href=\"https:\u002F\u002Fsites.google.com\u002Fview\u002Ftheseus-ai\u002F\">Webpage\u003C\u002Fa> •\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\u002Ftutorials\">Tutorials\u003C\u002Fa>\n\u003C\u002Fp>\n\nTheseus is an efficient application-agnostic library for building custom nonlinear optimization layers in PyTorch to support constructing various problems in robotics and vision as end-to-end differentiable architectures.\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Ffacebookresearch_theseus_readme_94b60de7e82d.gif)\n\nDifferentiable nonlinear optimization provides a general scheme to encode inductive priors, as the objective function can be partly parameterized by neural models and partly with expert domain-specific differentiable models. The ability to compute gradients end-to-end is retained by differentiating through the optimizer which allows neural models to train on the final task loss, while also taking advantage of priors captured by the optimizer.\n\nSee [list of papers](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002Fpapers.md) published using Theseus for  examples across various application domains.\n\n-----\n\n## Current Features\n\n### Application agnostic interface\nOur implementation provides an easy to use interface to build custom optimization layers and plug them into any neural architecture. Following differentiable features are currently available:\n- [Second-order nonlinear optimizers](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\u002Ftheseus\u002Foptimizer\u002Fnonlinear)\n    - Gauss-Newton (GN), Levenberg–Marquardt (LM), Trust Region, Dogleg\n- [Other nonlinear optimizers](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\u002Ftheseus\u002Foptimizer\u002Fnonlinear)\n    - Cross Entropy Method (CEM)\n- [Linear solvers](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\u002Ftheseus\u002Foptimizer\u002Flinear)\n    - Dense: Cholesky, LU; Sparse: CHOLMOD, LU (GPU-only), [BaSpaCho](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fbaspacho)\n- [Commonly used costs](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\u002Ftheseus\u002Fembodied), [AutoDiffCostFunction](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002Ftheseus\u002Fcore\u002Fcost_function.py), [RobustCostFunction](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002Ftheseus\u002Fcore\u002Frobust_cost_function.py)\n- [Lie groups](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\u002Ftheseus\u002Fgeometry) based on [torchlie](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\u002Ftorchlie)\n- [Robot kinematics](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002Ftheseus\u002Fembodied\u002Fkinematics) based on [torchkin](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\u002Ftorchkin)\n\n### Efficiency based design\nWe support several features that improve computation times and memory consumption:\n- [Sparse linear solvers](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\u002Ftheseus\u002Foptimizer\u002Flinear)\n- Batching and GPU acceleration\n- [Automatic vectorization](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002Ftheseus\u002Fcore\u002Fvectorizer.py)\n- [Backward modes](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002Ftheseus\u002Foptimizer\u002Fnonlinear\u002Fnonlinear_optimizer.py)\n    - Implicit, Truncated, Direct Loss Minimization ([DLM](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002Ftheseus\u002Ftheseus_layer.py)), Sampling ([LEO](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002Fexamples\u002Fstate_estimation_2d.py))\n\n\n## Getting Started\n\n### Prerequisites\n- We *strongly* recommend you install Theseus in a venv or conda environment with Python 3.8-3.10.\n- Theseus requires `torch` installation. To install for your particular CPU\u002FCUDA configuration, follow the instructions in the PyTorch [website](https:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F).\n- For GPU support, Theseus requires [nvcc](https:\u002F\u002Fdocs.nvidia.com\u002Fcuda\u002Fcuda-compiler-driver-nvcc\u002Findex.html) to compile custom CUDA operations. Make sure it matches the version used to compile pytorch with `nvcc --version`. If not, install it and ensure its location is on your system's `$PATH` variable.\n- Theseus also requires [`suitesparse`](https:\u002F\u002Fpeople.engr.tamu.edu\u002Fdavis\u002Fsuitesparse.html), which you can install via:\n    - `sudo apt-get install libsuitesparse-dev` (Ubuntu).\n    - `conda install -c conda-forge suitesparse` (Mac).\n    \n### Installing\n\n- **pypi**\n    ```bash\n    pip install theseus-ai\n    ```\n    We currently provide wheels with our CUDA extensions compiled using CUDA 11.6 and Python 3.10.\n    For other CUDA versions, consider installing from source or using our \n    [build script](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002Fbuild_scripts\u002Fbuild_wheel.sh).\n\n    Note that `pypi` installation doesn't include our experimental [Theseus Labs](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\u002Ftheseus\u002Flabs).\n    For this, please install from source.\n\n- #### **From source**\n    The simplest way to install Theseus from source is by running the following (see further below to also include BaSpaCho)\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus.git && cd theseus\n    pip install -e .\n    ```\n    If you are interested in contributing to Theseus, instead install\n    ```bash\n    pip install -e \".[dev]\"\n    pre-commit install\n    ```\n    and follow the more detailed instructions in [CONTRIBUTING](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002FCONTRIBUTING.md).\n\n- **Installing BaSpaCho extensions from source**\n\n    By default, installing from source doesn't include our BaSpaCho sparse solver extension. For this, follow these steps:\n\n    1. Compile BaSpaCho from source following instructions [here](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fbaspacho). We recommend using flags `-DBLA_STATIC=ON -DBUILD_SHARED_LIBS=OFF`.\n    2. Run\n        \n        ```bash\n        git clone https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus.git && cd theseus\n        BASPACHO_ROOT_DIR=\u003Cpath\u002Fto\u002Froot\u002Fbaspacho\u002Fdir> pip install -e .\n        ```\n        \n        where the BaSpaCho root dir must have the binaries in the subdirectory `build`.\n\n### Running unit tests (requires `dev` installation)\n```bash\npython -m pytest tests\n```\nBy default, unit tests include tests for our CUDA extensions. You can add the option `-m \"not cudaext\"`\nto skip them when installing without CUDA support. Additionally, the tests for sparse solver BaSpaCho are automatically \nskipped when its extlib is not compiled.\n\n\n## Examples\n\n[Simple example](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002Fexamples\u002Fsimple_example.py). This example is fitting the curve $y$ to a dataset of $N$ observations $(x,y) \\sim D$. This is modeled as an `Objective` with a single `CostFunction` that computes the residual $y - v e^x$. The `Objective` and the `GaussNewton` optimizer are encapsulated into a `TheseusLayer`. With `Adam` and MSE loss, $x$ is learned by differentiating through the `TheseusLayer`.\n\n```python\nimport torch\nimport theseus as th\n\nx_true, y_true, v_true = read_data() # shapes (1, N), (1, N), (1, 1)\nx = th.Variable(torch.randn_like(x_true), name=\"x\")\ny = th.Variable(y_true, name=\"y\")\nv = th.Vector(1, name=\"v\") # a manifold subclass of Variable for optim_vars\n\ndef error_fn(optim_vars, aux_vars): # returns y - v * exp(x)\n    x, y = aux_vars\n    return y.tensor - optim_vars[0].tensor * torch.exp(x.tensor)\n\nobjective = th.Objective()\ncost_function = th.AutoDiffCostFunction(\n    [v], error_fn, y_true.shape[1], aux_vars=[x, y],\n    cost_weight=th.ScaleCostWeight(1.0))\nobjective.add(cost_function)\nlayer = th.TheseusLayer(th.GaussNewton(objective, max_iterations=10))\n\nphi = torch.nn.Parameter(x_true + 0.1 * torch.ones_like(x_true))\nouter_optimizer = torch.optim.Adam([phi], lr=0.001)\nfor epoch in range(10):\n    solution, info = layer.forward(\n        input_tensors={\"x\": phi.clone(), \"v\": torch.ones(1, 1)},\n        optimizer_kwargs={\"backward_mode\": \"implicit\"})\n    outer_loss = torch.nn.functional.mse_loss(solution[\"v\"], v_true)\n    outer_loss.backward()\n    outer_optimizer.step()\n```\n\nSee [tutorials](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002Ftutorials\u002F), and robotics and vision [examples](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\u002Fexamples) to learn about the API and usage.\n\n\n## Citing Theseus\n\nIf you use Theseus in your work, please cite the [paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2207.09442) with the BibTeX below.\n\n```bibtex\n@article{pineda2022theseus,\n  title   = {{Theseus: A Library for Differentiable Nonlinear Optimization}},\n  author  = {Luis Pineda and Taosha Fan and Maurizio Monge and Shobha Venkataraman and Paloma Sodhi and Ricky TQ Chen and Joseph Ortiz and Daniel DeTone and Austin Wang and Stuart Anderson and Jing Dong and Brandon Amos and Mustafa Mukadam},\n  journal = {Advances in Neural Information Processing Systems},\n  year    = {2022}\n}\n```\n\n\n## License\n\nTheseus is MIT licensed. See the [LICENSE](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002FLICENSE) for details.\n\n\n## Additional Information\n\n- Join the community on [Github Discussions](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fdiscussions) for questions and sugesstions.\n- Use [Github Issues](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fissues\u002Fnew\u002Fchoose) for bugs and features.\n- See [CONTRIBUTING](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002FCONTRIBUTING.md) if interested in helping out.\n\nTheseus is made possible by the following contributors:\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fgraphs\u002Fcontributors\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Ffacebookresearch_theseus_readme_f666bf662839.png\" \u002F>\n\u003C\u002Fa>\n\nMade with [contrib.rocks](https:\u002F\u002Fcontrib.rocks).\n","![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Ffacebookresearch_theseus_readme_ed4689cfc8dd.png)\n\n\u003Cp align=\"center\">\n    \u003C!-- CI -->\n    \u003Ca href=\"https:\u002F\u002Fcircleci.com\u002Fgh\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\">\n        \u003Cimg src=\"https:\u002F\u002Fcircleci.com\u002Fgh\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain.svg?style=svg\" alt=\"CircleCI\" height=\"20\">\n    \u003C\u002Fa>\n    \u003C!-- License -->\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002FLICENSE\">\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg\" alt=\"License\" height=\"20\">\n    \u003C\u002Fa>\n    \u003C!-- pypi -->\n    \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Ftheseus-ai\u002F\">\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Ftheseus-ai\" alt=\"pypi\"\n        heigh=\"20\">\n    \u003C!-- Downloads counter -->\n    \u003Ca href=\"https:\u002F\u002Fpepy.tech\u002Fproject\u002Ftheseus-ai\">\n        \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Ffacebookresearch_theseus_readme_b21f8868b907.png\" alt=\"PyPi Downloads\" height=\"20\">\n    \u003C\u002Fa>\n    \u003C!-- Python -->\n    \u003Ca href=\"https:\u002F\u002Fwww.python.org\u002Fdownloads\u002Frelease\u002F\">\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.8%20%7C%203.9%20%7C%203.10-blue.svg\" alt=\"Python\" height=\"20\">\n    \u003C\u002Fa>\n    \u003C!-- Pre-commit -->\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fpre-commit\u002Fpre-commit\">\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpre--commit-enabled-green?logo=pre-commit&logoColor=white\" alt=\"pre-commit\" height=\"20\">\n    \u003C\u002Fa>\n    \u003C!-- Black -->\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fpsf\u002Fblack\">\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcode%20style-black-000000.svg\" alt=\"black\" height=\"20\">\n    \u003C\u002Fa>\n    \u003C!-- PRs -->\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002FCONTRIBUTING.md\">\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPRs-welcome-green.svg\" alt=\"PRs\" height=\"20\">\n    \u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n    \u003Ci>一个用于可微分非线性优化的库\u003C\u002Fi>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2207.09442\">论文\u003C\u002Fa> •\n    \u003Ca href=\"https:\u002F\u002Fyoutu.be\u002FzIbPHXegNn8\">视频\u003C\u002Fa> •\n    \u003Ca href=\"https:\u002F\u002Fx.com\u002Fmukadammh\u002Fstatus\u002F1549773856738615297\">Twitter\u003C\u002Fa> •\n    \u003Ca href=\"https:\u002F\u002Fsites.google.com\u002Fview\u002Ftheseus-ai\u002F\">网页\u003C\u002Fa> •\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\u002Ftutorials\">教程\u003C\u002Fa>\n\u003C\u002Fp>\n\nTheseus 是一个高效且与应用无关的库，用于在 PyTorch 中构建自定义的非线性优化层，以支持将机器人和视觉领域的各种问题构建成端到端可微分的架构。\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Ffacebookresearch_theseus_readme_94b60de7e82d.gif)\n\n可微分的非线性优化提供了一种通用的方法来编码归纳先验，因为目标函数可以部分由神经网络模型参数化，而另一部分则使用领域专家设计的可微分模型。通过在优化器中进行反向传播，仍然可以保留端到端计算梯度的能力，从而使神经网络能够在最终的任务损失上进行训练，同时还能利用优化器所捕捉到的先验信息。\n\n请参阅 [论文列表](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002Fpapers.md)，其中包含了使用 Theseus 发表的、涵盖多个应用领域的示例。\n\n-----\n\n## 当前特性\n\n### 应用无关的接口\n我们的实现提供了一个易于使用的接口，用于构建自定义的优化层，并将其插入到任何神经网络架构中。目前支持以下可微分功能：\n- [二阶非线性优化器](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\u002Ftheseus\u002Foptimizer\u002Fnonlinear)\n    - 高斯-牛顿法 (GN)、莱文伯格-马夸尔特法 (LM)、信赖域法、狗腿法\n- [其他非线性优化器](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\u002Ftheseus\u002Foptimizer\u002Fnonlinear)\n    - 交叉熵方法 (CEM)\n- [线性求解器](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\u002Ftheseus\u002Foptimizer\u002Flinear)\n    - 密集型：Cholesky 分解、LU 分解；稀疏型：CHOLMOD、LU（仅 GPU）、[BaSpaCho](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fbaspacho)\n- [常用代价函数](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\u002Ftheseus\u002Fembodied)、[自动微分代价函数](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002Ftheseus\u002Fcore\u002Fcost_function.py)、[鲁棒代价函数](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002Ftheseus\u002Fcore\u002Frobust_cost_function.py)\n- 基于 [torchlie](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\u002Ftorchlie) 的 [李群](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\u002Ftheseus\u002Fgeometry)\n- 基于 [torchkin](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\u002Ftorchkin) 的 [机器人运动学](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002Ftheseus\u002Fembodied\u002Fkinematics)\n\n### 高效的设计\n我们支持多项能够提升计算速度和降低内存消耗的功能：\n- [稀疏线性求解器](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\u002Ftheseus\u002Foptimizer\u002Flinear)\n- 批处理和 GPU 加速\n- [自动向量化](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002Ftheseus\u002Fcore\u002Fvectorizer.py)\n- [反向模式](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002Ftheseus\u002Foptimizer\u002Fnonlinear\u002Fnonlinear_optimizer.py)\n    - 隐式模式、截断模式、直接损失最小化 ([DLM](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002Ftheseus\u002Ftheseus_layer.py))、采样模式 ([LEO](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002Fexamples\u002Fstate_estimation_2d.py))\n\n\n## 入门指南\n\n### 先决条件\n- 我们*强烈*建议您在 Python 3.8–3.10 的 venv 或 conda 环境中安装 Theseus。\n- Theseus 需要安装 `torch`。请根据您的 CPU\u002FCUDA 配置，按照 PyTorch [官网](https:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F) 的说明进行安装。\n- 为了支持 GPU，Theseus 需要 [nvcc](https:\u002F\u002Fdocs.nvidia.com\u002Fcuda\u002Fcuda-compiler-driver-nvcc\u002Findex.html) 来编译自定义的 CUDA 操作。请确保其版本与编译 PyTorch 时使用的 `nvcc --version` 版本一致。如果不一致，请安装并确保其路径已添加到系统的 `$PATH` 变量中。\n- Theseus 还需要 [`suitesparse`](https:\u002F\u002Fpeople.engr.tamu.edu\u002Fdavis\u002Fsuitesparse.html)，您可以按以下方式安装：\n    - `sudo apt-get install libsuitesparse-dev`（Ubuntu）。\n    - `conda install -c conda-forge suitesparse`（Mac）。\n\n### 安装\n\n- **pypi**\n    ```bash\n    pip install theseus-ai\n    ```\n    目前我们提供的 wheel 包是使用 CUDA 11.6 和 Python 3.10 编译的 CUDA 扩展。对于其他 CUDA 版本，请考虑从源码安装，或使用我们的\n    [构建脚本](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002Fbuild_scripts\u002Fbuild_wheel.sh)。\n\n    请注意，通过 `pypi` 安装不会包含我们的实验性 [Theseus Labs](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\u002Ftheseus\u002Flabs)。\n    如果需要这些功能，请从源码安装。\n\n- #### **从源码安装**\n    从源码安装 Theseus 的最简单方法是运行以下命令（请参阅下文以同时包含 BaSpaCho）：\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus.git && cd theseus\n    pip install -e .\n    ```\n    如果您有兴趣为 Theseus 做贡献，可以安装：\n    ```bash\n    pip install -e \".[dev]\"\n    pre-commit install\n    ```\n    并按照 [CONTRIBUTING](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002FCONTRIBUTING.md) 中更详细的说明进行操作。\n\n- **从源码安装 BaSpaCho 扩展**\n\n    默认情况下，从源码安装不会包含我们的 BaSpaCho 稀疏求解器扩展。要包含该扩展，请按照以下步骤操作：\n\n    1. 按照 [这里](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fbaspacho) 的说明从源码编译 BaSpaCho。我们建议使用 `-DBLA_STATIC=ON -DBUILD_SHARED_LIBS=OFF` 标志。\n    2. 运行\n    \n        ```bash\n        git clone https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus.git && cd theseus\n        BASPACHO_ROOT_DIR=\u003Cba-spacho根目录路径> pip install -e .\n        ```\n        \n        其中，BaSpaCho 的根目录必须在 `build` 子目录中包含二进制文件。\n\n### 运行单元测试（需要 `dev` 安装）\n```bash\npython -m pytest tests\n```\n默认情况下，单元测试会包含对 CUDA 扩展的测试。如果未安装 CUDA 支持，可以通过添加 `-m \"not cudaext\"` 选项来跳过这些测试。此外，当 BaSpaCho 稀疏求解器扩展未编译时，其测试也会自动跳过。\n\n\n## 示例\n\n[简单示例](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002Fexamples\u002Fsimple_example.py)。此示例将曲线 $y$ 拟合到包含 $N$ 个观测值 $(x,y) \\sim D$ 的数据集上。这被建模为一个 `Objective`，其中包含一个计算残差 $y - v e^x$ 的 `CostFunction`。`Objective` 和 `GaussNewton` 优化器被封装进一个 `TheseusLayer` 中。通过 `Adam` 优化器和 MSE 损失函数，$x$ 变量可以通过对 `TheseusLayer` 的反向传播来学习。\n\n```python\nimport torch\nimport theseus as th\n\nx_true, y_true, v_true = read_data() # 形状分别为 (1, N), (1, N), (1, 1)\nx = th.Variable(torch.randn_like(x_true), name=\"x\")\ny = th.Variable(y_true, name=\"y\")\nv = th.Vector(1, name=\"v\") # 用于优化变量的流形子类 Variable\n\ndef error_fn(optim_vars, aux_vars): # 返回 y - v * exp(x)\n    x, y = aux_vars\n    return y.tensor - optim_vars[0].tensor * torch.exp(x.tensor)\n\nobjective = th.Objective()\ncost_function = th.AutoDiffCostFunction(\n    [v], error_fn, y_true.shape[1], aux_vars=[x, y],\n    cost_weight=th.ScaleCostWeight(1.0))\nobjective.add(cost_function)\nlayer = th.TheseusLayer(th.GaussNewton(objective, max_iterations=10))\n\nphi = torch.nn.Parameter(x_true + 0.1 * torch.ones_like(x_true))\nouter_optimizer = torch.optim.Adam([phi], lr=0.001)\nfor epoch in range(10):\n    solution, info = layer.forward(\n        input_tensors={\"x\": phi.clone(), \"v\": torch.ones(1, 1)},\n        optimizer_kwargs={\"backward_mode\": \"implicit\"})\n    outer_loss = torch.nn.functional.mse_loss(solution[\"v\"], v_true)\n    outer_loss.backward()\n    outer_optimizer.step()\n```\n\n更多关于 API 和用法的信息，请参阅 [教程](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002Ftutorials\u002F) 以及机器人和视觉领域的 [示例](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\u002Fexamples)。\n\n\n## 引用 Theseus\n\n如果您在工作中使用了 Theseus，请引用以下论文，并使用提供的 BibTeX 格式：\n\n```bibtex\n@article{pineda2022theseus,\n  title   = {{Theseus: A Library for Differentiable Nonlinear Optimization}},\n  author  = {Luis Pineda and Taosha Fan and Maurizio Monge and Shobha Venkataraman and Paloma Sodhi and Ricky TQ Chen and Joseph Ortiz and Daniel DeTone and Austin Wang and Stuart Anderson and Jing Dong and Brandon Amos and Mustafa Mukadam},\n  journal = {Advances in Neural Information Processing Systems},\n  year    = {2022}\n}\n```\n\n\n## 许可证\n\nTheseus 采用 MIT 许可证。详细信息请参阅 [LICENSE](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002FLICENSE)。\n\n\n## 更多信息\n\n- 如有任何问题或建议，请加入 [Github Discussions](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fdiscussions) 社区。\n- 如发现错误或有新功能需求，请使用 [Github Issues](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fissues\u002Fnew\u002Fchoose) 提交。\n- 如果您有兴趣参与贡献，请参阅 [CONTRIBUTING](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fblob\u002Fmain\u002FCONTRIBUTING.md)。\n\nTheseus 的开发离不开以下贡献者的支持：\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fgraphs\u002Fcontributors\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Ffacebookresearch_theseus_readme_f666bf662839.png\" \u002F>\n\u003C\u002Fa>\n\n由 [contrib.rocks](https:\u002F\u002Fcontrib.rocks) 制作。","# Theseus 快速上手指南\n\nTheseus 是一个用于构建可微分非线性优化层的 PyTorch 库，专为机器人学和计算机视觉领域的端到端可微架构设计。它允许将专家先验知识与神经网络结合，通过可微优化器进行反向传播训练。\n\n## 环境准备\n\n在开始之前，请确保满足以下系统要求和依赖：\n\n*   **Python 版本**：推荐 3.8 - 3.10（强烈建议在 `venv` 或 `conda` 环境中安装）。\n*   **PyTorch**：必须预先安装。请根据您的 CPU\u002FCUDA 配置参考 [PyTorch 官网](https:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F) 进行安装。\n    *   *国内加速*：可使用清华源安装，例如：`pip install torch torchvision torchaudio --index-url https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple`\n*   **GPU 支持（可选）**：若需使用 GPU 加速自定义 CUDA 操作，需安装 `nvcc`。请确保 `nvcc --version` 显示的版本与编译当前 PyTorch 所用的 CUDA 版本一致，并将 nvcc 路径加入系统 `$PATH`。\n*   **SuiteSparse**：Theseus 依赖此库进行稀疏线性求解。\n    *   Ubuntu: `sudo apt-get install libsuitesparse-dev`\n    *   macOS (Conda): `conda install -c conda-forge suitesparse`\n    *   *国内加速*：使用清华或中科大 Conda 源可显著提升下载速度。\n\n## 安装步骤\n\n### 方式一：通过 PyPI 安装（推荐）\n\n这是最简单的安装方式，适用于大多数用户。预编译包基于 CUDA 11.6 和 Python 3.10。\n\n```bash\npip install theseus-ai\n```\n\n> **注意**：PyPI 版本不包含实验性的 \"Theseus Labs\" 模块。如需使用该部分功能，请选择源码安装。\n\n### 方式二：从源码安装\n\n如果您需要最新功能、贡献代码或使用实验性模块，请从源码安装。\n\n1. 克隆仓库并进入目录：\n   ```bash\n   git clone https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus.git && cd theseus\n   ```\n\n2. 安装开发依赖（包含测试和格式化工具）：\n   ```bash\n   pip install -e \".[dev]\"\n   pre-commit install\n   ```\n\n   若仅需基础功能，可运行：\n   ```bash\n   pip install -e .\n   ```\n\n### （可选）安装 BaSpaCho 稀疏求解器扩展\n\n默认源码安装不包含 BaSpaCho。如需启用该高性能稀疏求解器：\n\n1. 按照 [BaSpaCho 官方说明](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fbaspacho) 从源码编译，推荐使用标志 `-DBLA_STATIC=ON -DBUILD_SHARED_LIBS=OFF`。\n2. 设置环境变量并安装 Theseus：\n   ```bash\n   BASPACHO_ROOT_DIR=\u003Cpath\u002Fto\u002Froot\u002Fbaspacho\u002Fdir> pip install -e .\n   ```\n   *(请将 `\u003Cpath\u002Fto\u002Froot\u002Fbaspacho\u002Fdir>` 替换为包含 `build` 子目录的 BaSpaCho 根路径)*\n\n## 基本使用\n\n以下示例演示了如何使用 Theseus 拟合曲线 $y = v \\cdot e^x$。我们将构建一个优化目标，将其封装为 `TheseusLayer`，并通过外部优化器（Adam）学习参数 $x$。\n\n```python\nimport torch\nimport theseus as th\n\n# 假设已有数据读取函数\nx_true, y_true, v_true = read_data() # shapes (1, N), (1, N), (1, 1)\n\n# 定义优化变量和辅助变量\nx = th.Variable(torch.randn_like(x_true), name=\"x\")\ny = th.Variable(y_true, name=\"y\")\nv = th.Vector(1, name=\"v\") # 用于优化的流形变量子类\n\n# 定义误差函数：residual = y - v * exp(x)\ndef error_fn(optim_vars, aux_vars):\n    x, y = aux_vars\n    return y.tensor - optim_vars[0].tensor * torch.exp(x.tensor)\n\n# 构建优化目标\nobjective = th.Objective()\ncost_function = th.AutoDiffCostFunction(\n    [v], error_fn, y_true.shape[1], aux_vars=[x, y],\n    cost_weight=th.ScaleCostWeight(1.0))\nobjective.add(cost_function)\n\n# 封装为 TheseusLayer，使用 Gauss-Newton 优化器\nlayer = th.TheseusLayer(th.GaussNewton(objective, max_iterations=10))\n\n# 初始化待学习参数 phi (对应 x)\nphi = torch.nn.Parameter(x_true + 0.1 * torch.ones_like(x_true))\nouter_optimizer = torch.optim.Adam([phi], lr=0.001)\n\n# 训练循环\nfor epoch in range(10):\n    # 前向传播：执行优化\n    solution, info = layer.forward(\n        input_tensors={\"x\": phi.clone(), \"v\": torch.ones(1, 1)},\n        optimizer_kwargs={\"backward_mode\": \"implicit\"})\n    \n    # 计算外部损失 (MSE)\n    outer_loss = torch.nn.functional.mse_loss(solution[\"v\"], v_true)\n    \n    # 反向传播并更新参数\n    outer_loss.backward()\n    outer_optimizer.step()\n```\n\n更多详细教程和应用案例（如机器人运动学、状态估计等），请参阅官方 [Tutorials](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\u002Ftutorials) 和 [Examples](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Ftree\u002Fmain\u002Fexamples) 目录。","某自动驾驶初创团队的算法工程师正在开发一套端到端的视觉里程计系统，需要将传统的几何优化模块与深度学习感知网络无缝融合。\n\n### 没有 theseus 时\n- **梯度断裂导致训练低效**：传统非线性优化器（如 Ceres 或 g2o）无法反向传播梯度，迫使团队使用强化学习或近似监督信号来训练感知网络，收敛速度慢且精度受限。\n- **架构耦合度极高**：为了模拟优化过程，工程师不得不手动推导雅可比矩阵并编写自定义的 PyTorch 层，代码冗长且极易出错，难以适配不同的传感器配置。\n- **无法利用专家先验**：由于难以将物理约束（如车辆运动学模型）作为可微层嵌入网络，模型只能单纯依赖数据驱动，在少样本场景下泛化能力差，容易出现违背物理规律的预测。\n- **迭代开发周期长**：每次调整优化目标函数或求解器策略（如从高斯 - 牛顿法切换到列文伯格 - 马夸尔特法），都需要重写大量底层代码，严重拖慢实验迭代速度。\n\n### 使用 theseus 后\n- **实现真正端到端训练**：theseus 提供了可微的非线性优化层，允许梯度直接穿过优化器回传至感知网络，团队得以直接使用最终位姿误差作为损失函数，显著提升了定位精度。\n- **模块化快速构建**：借助 its 应用无关的接口，工程师仅需定义变量和代价函数即可自动构建优化层，无需手动处理复杂的矩阵求导，轻松集成了稀疏线性求解器以加速计算。\n- **神经与符号完美融合**：团队成功将专家设计的运动学约束编码为 theseus 的代价项，与神经网络参数共同优化，使系统在极端光照等数据稀缺场景下仍保持鲁棒性。\n- **灵活切换求解策略**：通过简单配置即可在高斯 - 牛顿、列文伯格 - 马夸尔特等不同二阶优化器间切换，快速验证不同算法组合对最终任务性能的影响，研发效率提升数倍。\n\ntheseus 的核心价值在于打破了传统优化与深度学习之间的壁垒，让开发者能像搭积木一样构建兼具物理可解释性与数据驱动能力的混合智能系统。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Ffacebookresearch_theseus_a49bae2f.png","facebookresearch","Meta Research","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Ffacebookresearch_449342bd.png","",null,"https:\u002F\u002Fopensource.fb.com","https:\u002F\u002Fgithub.com\u002Ffacebookresearch",[83,87,91,95,99],{"name":84,"color":85,"percentage":86},"Python","#3572A5",93.4,{"name":88,"color":89,"percentage":90},"C++","#f34b7d",3.3,{"name":92,"color":93,"percentage":94},"Cuda","#3A4E3A",2.4,{"name":96,"color":97,"percentage":98},"Shell","#89e051",0.9,{"name":100,"color":101,"percentage":102},"C","#555555",0.1,2013,146,"2026-04-04T19:54:14","MIT",4,"Linux, macOS","可选。若需 GPU 加速或编译自定义 CUDA 操作，需要 NVIDIA GPU 及匹配的 CUDA 版本（预编译轮子基于 CUDA 11.6）。需安装 nvcc 且版本需与编译 PyTorch 的版本一致。部分线性求解器（如稀疏 LU）仅支持 GPU。","未说明",{"notes":112,"python":113,"dependencies":114},"强烈建议在 venv 或 conda 环境中安装。GPU 支持必须安装与当前 PyTorch 版本匹配的 nvcc 编译器，并确保其在系统 PATH 中。Ubuntu 用户需通过 apt 安装 libsuitesparse-dev，Mac 用户可通过 conda 安装 suitesparse。默认源码安装不包含 BaSpaCho 扩展，如需使用需单独编译并指定路径安装。PyPI 版本不包含实验性的 Theseus Labs 模块，需源码安装获取。","3.8, 3.9, 3.10",[115,116,117,118,119],"torch","suitesparse (libsuitesparse-dev 或 conda-forge 版)","nvcc (用于 GPU 支持)","BaSpaCho (可选，用于稀疏求解器扩展)","pytest (用于运行测试)",[54,13,14],[122,123,124,125,126,127,128,129,130,131,132],"differentiable-optimization","robotics","embodied-ai","nonlinear-least-squares","pytorch","deep-learning","computer-vision","gauss-newton","levenberg-marquardt","implicit-differentiation","bilevel-optimization","2026-03-27T02:49:30.150509","2026-04-06T11:31:08.728629",[136,141,146,151,155,160],{"id":137,"question_zh":138,"answer_zh":139,"source_url":140},16171,"为什么添加 Huber Loss 后，即使半径很大，损失值趋势也与预期不符？","这通常是因为实现方式有误。正确的测试标准是：实现为 N 个独立的 dim=1 鲁棒损失函数（未开启特定标志）的结果，应与实现为单个 dim=N 鲁棒损失函数（开启特定标志）的结果一致。如果趋势不符，请检查是否错误地修改了原始代价函数结构或未正确应用鲁棒核函数标志。","https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fissues\u002F497",{"id":142,"question_zh":143,"answer_zh":144,"source_url":145},16170,"实现 Dogleg 非线性优化器时，信任区域半径（trust region radius）应如何处理？","输入中的 `delta` 指代信任区域半径，建议将其作为优化器的成员变量（类型为 tensor 以支持批量处理）。其他量（如 sd 方向和 gn 方向）可直接从线性化过程中计算得出：sd 方向对应 `dx_u`，gn 方向可通过 `self.linear_solver.solve()` 获得（对应 `dx_n`）。此外，可能需要实现 `optimizer.reset()` 方法，以确保在不同优化器调用之间不保留旧的信任区域。","https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fissues\u002F15",{"id":147,"question_zh":148,"answer_zh":149,"source_url":150},16166,"在使用 AutoDiffCostFunction 时，是否需要手动为优化变量设置 requires_grad=True？","不需要。即使使用 `AutoDiffCostFunction`，也无需手动设置 `requires_grad=True`。如果遇到问题，通常是因为优化问题本身设置不当（例如雅可比矩阵秩缺失），而非梯度设置问题。","https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fissues\u002F596",{"id":152,"question_zh":153,"answer_zh":154,"source_url":140},16167,"如何验证鲁棒损失函数（Robust Cost Function）的实现是否正确？","可以通过对比测试来验证：将 N 个独立的 dim=1 鲁棒损失函数（不开启新标志位）的实现结果，与单个 dim=N 鲁棒损失函数（开启新标志位）的实现结果进行对比。两者应当给出相同的结果。",{"id":156,"question_zh":157,"answer_zh":158,"source_url":159},16168,"遇到内存爆炸（超过 50GB）或误差指标变为 NaN 的问题该如何解决？","该问题通常由特定版本的 Bug 引起。维护者指出 Issue #661（已合并）修复了此问题。建议升级代码库到包含该修复的最新版本。如果问题依旧，请检查是否涉及 SE3 变量到四元数再转回旋转矩阵的自定义转换过程，确保数值稳定性。","https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fissues\u002F654",{"id":161,"question_zh":162,"answer_zh":163,"source_url":164},16169,"如何在不调用 optimize() 的情况下获取目标函数的误差值？","可以使用 `error()` 或 `errorSquaredNorm()` 方法。如果不传递参数，将基于当前内部变量值计算误差；如果传入 `var_data`，则会在内部先调用 `update` 更新目标函数后再计算。若需基于新值计算但不想永久更新目标函数状态，可查阅相关 API 是否支持临时更新标志（具体取决于版本实现，早期讨论建议通过传入数据触发内部更新）。","https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fissues\u002F4",[166,171,176,181,186,191,196,201,206,211],{"id":167,"version":168,"summary_zh":169,"released_at":170},90828,"0.1.1","## 亮点\n* 添加了这些斯-AI 的 pip 安装说明。由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F276 中完成。\n* 为 AutoDiffCostFunction 添加了 functorch 支持。由 @fantaosha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F268 中完成。\n* 对 AutoDiffCostFunction 进行性能分析，并重构了单应性变换示例。由 @fantaosha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F296 中完成。\n\n## 变更内容\n* 更新位姿图数据链接。由 @fantaosha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F256 中完成。\n* [单应性] 正确使用 kornia 库进行透视变换。由 @ddetone 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F258 中完成。\n* 对 00_introduction.ipynb 进行小幅更新。由 @NeilPandya 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F259 中完成。\n* 将 SDF 构造函数修改为接受更便捷的数据类型。由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F260 中完成。\n* 修复 MotionPlanner 类中的小 bug。由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F261 中完成。\n* 向轨迹可视化函数中添加了可视化 SDF 的选项。由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F263 中完成。\n* 更新 README 文件。由 @mhmukadam 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F264 中完成。\n* 添加了 MotionPlanner.forward() 方法。由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F267 中完成。\n* 对 generate_trajectory_figs 进行了小的 bug 修复和调整。由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F271 中完成。\n* 添加了一个在新 Docker 镜像上构建 wheel 文件的脚本。由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F257 中完成。\n* Bug 修复：单应性估计——在下载数据之前先创建数据文件夹。由 @luizgh 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F275 中完成。\n* 添加了这些斯-AI 的 pip 安装说明。由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F276 中完成。\n* 重构 MotionPlanner，使其能够单独传递目标函数。由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F277 中完成。\n* 向流形和李群中添加 numel() 方法。由 @fantaosha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F280 中完成。\n* 在 Collision2D 中添加对 SE2 姿态的支持。由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F278 中完成。\n* 实现概率正确的 SO(3) 采样。由 @brentyi 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F286 中完成。\n* 重构 SO3 和 SE3，使其与 functorch 保持一致。由 @fantaosha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F266 中完成。\n* 在 MotionPlanner 中添加 SE2 支持。由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F282 中完成。\n* 修复 SE2 运动规划可视化中的 bug。由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F293 中完成。\n* 为 AutoDiffCostFunction 添加了 functorch 支持。由 @fantaosha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F268 中完成。\n* 修改依赖项，使 main.txt 只包含必要的依赖包。由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F294 中完成。\n* 添加 to_quaternion、rotation、translation 和 convention co","2022-09-28T14:19:37",{"id":172,"version":173,"summary_zh":174,"released_at":175},90829,"0.1.0","本次代码发布也与 [arXiv v1 论文](https:\u002F\u002Farxiv.org\u002Fabs\u002F2207.09442v1) 的发布相关联。\n\n## 变更内容\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F46 中添加了 SO3 支持。\n* @fantaosha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F65 中添加了 SO3 类。\n* @fantaosha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F57 中实现了 SO3 的旋转和逆旋转操作。\n* @fantaosha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F59 中添加了 so3._hat_matrix_check() 方法。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F51 中将触觉推动示例中的数据加载函数封装到一个新的类中。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F52 中添加了一个 TactilePoseEstimator 类，用于方便地创建触觉推动的 TheseusLayer。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F55 中重构了触觉推动模型的接口。\n* 2022年2月1日，@luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F66 中进行了小幅修复。\n* @fantaosha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F68 中为 SE3 添加了伴随、帽算子和vee算子。\n* @fantaosha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F71 中添加了 SE3.exp_map() 和 SE3.log_map() 方法。\n* @fantaosha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F72 中添加了 SE3.compose() 方法。\n* @fantaosha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F80 中添加了 SE3.transform_from 和 SE3.transform_to 方法。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F89 中更新至 CircleCI 的下一代镜像。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F90 中更新了 README，加入了 libsuitesparse 的安装说明。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F82 中为 NonlinearOptimizer.optimizer() 添加了关键字参数，用于跟踪误差历史。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F83 中合并了截断反向模式的信息结果。\n* @maurimo 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F97 中修复了 Issue 88。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F96 中修复了 Variable.update() 中的一个 bug，该 bug 曾导致 PyTorch 图结构损坏。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F81 中对截断反向模式的最后几次迭代强制使用高斯-牛顿步长。\n* @fantaosha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F74 中添加了李群切空间上的自动微分功能。\n* @fantaosha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F95 中为 LieGroup 添加了 rand() 方法。\n* @fantaosha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F58 中修复了 SO2 旋转和逆旋转的雅可比矩阵。\n* @fantaosha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F98 中为稀疏雅可比矩阵添加了投影功能。\n* @fantaosha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F99 中为 AutoDiffFunction 添加了 LieGroup 支持。\n* @fantaosha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F103 中添加了 SE2.transform from() 方法，并修复了 SE2.transform_to() 中的形状错误。","2022-07-20T15:06:07",{"id":177,"version":178,"summary_zh":179,"released_at":180},90830,"0.1.0-b.2","## 主要新增功能\n* @bamos 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F29 中实现了初始的隐式\u002F截断反向模式\n* @psodhi 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F30 中添加了支持基于负对数似然损失（LEO）的能量学习\n* @maurimo 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F22 中实现了基于 cusolver 的批处理 LU 分解求解器\n* @maurimo 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F23 中实现了 CUDA 批量矩阵乘法及其他操作\n* @maurimo 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F24 中实现了基于 CUDA 的求解器类和自动微分函数\n\n## 其他变更\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F2 中为教程 0 的末尾添加了更清晰的说明，并修复了文档中的拼写错误\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F3 中将 SE2\u002FSO2 的默认值设置为零元素，而非 torch.empty\n* @bamos 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F25 中为教程添加了图表\n* @vshobha 根据 issue #27 更新了教程 2 的文本，相关 PR 为 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F31\n* @mhmukadam 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F33 中更新了贡献指南并添加了 gitattributes 文件\n* @maurimo 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F21 中更新了持续集成配置\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F45 中将 TheseusLayer.forward() 改为接收 optimizer_kwargs 作为单个字典\n* [热修复] @maurimo 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F54 中修复了代码风格检查问题\n* @mhmukadam 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F63 中更新了版本号\n\n## 新贡献者\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F2 中做出了首次贡献\n* @bamos 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F25 中做出了首次贡献\n* @vshobha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F31 中做出了首次贡献\n* @maurimo 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F21 中做出了首次贡献\n* @mhmukadam 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F33 中做出了首次贡献\n* @psodhi 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F30 中做出了首次贡献\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fcompare\u002F0.1.0-b.1...0.1.0-b.2","2022-02-01T08:00:53",{"id":182,"version":183,"summary_zh":184,"released_at":185},90831,"0.1.0-b.1","初始测试版发布。\n- 核心数据结构。\n- 向量及二维刚体表示。\n- 高斯–牛顿法和莱文伯格–马夸尔特非线性优化器。\n- LU分解和Cholesky分解稠密线性方程组求解器。\n- Cholmod稀疏线性方程组求解器（仅CPU）。\n- 用于平面运动规划和平面推动物体中触觉估计的代价函数。","2021-12-03T20:28:36",{"id":187,"version":188,"summary_zh":189,"released_at":190},90822,"0.2.2","## 变更内容\n* 修复了 BaspachoSparseSolver 中的一个 bug，该 bug 导致在 Torch CUDA 可用时无法使用 CPU，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F585 中完成。\n* 将注释掉的测试重新添加回 Baspacho 求解器的测试中。由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F586 中完成。\n* Yipuz 实现了更鲁棒的损失函数，由 @YipuZhao 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F581 中完成。\n* 更新了 GPU 的 CI 执行器，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F608 中完成。\n* 移除了 Local 类中重复的误差计算，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F607 中完成。\n* 修改了 Objective::_erase_function_variables(...) 方法，使其也能删除变…，由 @Hesam-Vayu 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F612 中完成。\n* 更新了 pre-commit 钩子并修复了 mypy 错误，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F610 中完成。\n* `Objective.to()` 和 `TheseusLayer.to()` 现在会返回 `self`，并支持 `.cuda()` 方法，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F623 中完成。\n* 改进了 Timer 和 Profiler 工具，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F628 中完成。\n* 实现了更快的日志映射算法，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F629 中完成。\n* 修复了在使用 `LieTensor.exp()` 时反向图损坏的问题，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F631 中完成。\n* 修复了非线性优化器在处理矩阵变量和隐式微分时跟踪最佳解的问题，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F637 中完成。\n* 修复了损坏的测试，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F658 中完成。\n* 将 VariableOrdering.append 的时间复杂度从 O(N^2) 优化到 O(N)，由 @ahojnnes 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F657 中完成。\n* 在 SO3 到四元数的转换中为 sqrt 添加了 EPS 值，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F661 中完成。\n* 修复了 README 中的链接错误，由 @mhmukadam 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F662 中完成。\n\n## 新贡献者\n* @YipuZhao 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F581 中做出了首次贡献。\n* @Hesam-Vayu 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F612 中做出了首次贡献。\n* @ahojnnes 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F657 中做出了首次贡献。\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fcompare\u002F0.2.1...0.2.2","2024-09-11T17:13:49",{"id":192,"version":193,"summary_zh":194,"released_at":195},90823,"0.2.1","## 主要更新\n* @fantaosha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F562 中临时修复了 vmap 的一个 bug\n* @fantaosha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F568 中修复了棱柱关节中的一个 bug\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F579 中添加了当高斯-牛顿法在最后一步失败时的隐式模式回退机制\n\n## 其他变更\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F567 中允许将 Python 版本传递给构建脚本\n* @fantaosha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F560 中修正了 PGO 数据集中旋转和平移的顺序\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F571 中添加了性能分析工具\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F570 中防止使用设备或数据类型与目标函数不匹配的变量进行更新\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F572 中将 torchkin 版本升级至 v0.1.1\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F574 中移除了语义版本依赖\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F575 中修复了 PyTorch 李代数 API 示例中的错误\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F576 中添加了 `urdf_parser_py` 的备用导入\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F577 中添加了 Flake8 版权声明\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F582 中修复了 CI 环境中 `sksparse` 安装失败的问题\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F583 中将版本号更新至 0.2.1\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fcompare\u002F0.2.0...0.2.1","2023-07-21T16:34:51",{"id":197,"version":198,"summary_zh":199,"released_at":200},90824,"0.2.0","本次发布将 Theseus 升级至 [PyTorch >= 2.0.0](https:\u002F\u002Fpytorch.org\u002Fget-started\u002Fpytorch-2.0\u002F)，并使用我们团队新推出的精简高效 `torchlie` 和 `torchkin` 更新了可微分李群与可微分运动学的后端。`torchlie` 和 `torchkin` 均为独立的 PyPI 可安装库，随本次 Theseus 发布一同以 `0.1.0` 版本正式推出。\n\n## 主要更新\n* 废弃对 PyTorch \u003C 2.0.0 的支持，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F525 中完成  \n* 将 `torchlie` 从 labs 模块中移出，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F523 中完成  \n* 将正向运动学代码从 `labs` 中移至主分支，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F550 中完成  \n* 添加可微分 CEM 求解器，由 @dishank-b 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F329 中完成  \n* 引入全新的 NonlinearOptimizer 层次结构，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F440 中完成  \n* 增加用于自动检查给定代价函数雅可比矩阵的工具，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F465 中完成  \n* 添加包含 SE2 和非完整约束代价的规划示例，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F474 中完成  \n* 添加逆运动学示例，由 @fantaosha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F538 中完成  \n\n## 其他变更\n* 通过海森矩阵分离导数，由 @bamos 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F425 中完成  \n* 在 CI 中为复杂的 CPU 单元测试使用 resource_class:xlarge 资源，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F447 中完成  \n* 修复阻止在 setup 中使用依赖版本号的错误，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F448 中完成  \n* 在 precommit 中更新 isort 至 5.11.5，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F453 中完成  \n* 修改构建脚本以支持 nightly 包，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F467 中完成  \n* 添加 SignedDistanceField2D.to() 方法，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F468 中完成  \n* 添加单元测试以自动检查 PGO 损失值，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F456 中完成  \n* 对运动规划器代码进行小幅修复，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F469 中完成  \n* 修改 test_theseus_layer 中的数据模型，由 @dishank-b 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F477 中完成  \n* 将 HingeCost 改为接受更灵活的限制范围，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F491 中完成  \n* 添加实验性选项，允许变量同时作为优化变量和辅助变量，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F492 中完成  \n* 使 MotionPlanner 中的优化器可配置，由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F493 中完成  \n* 允许 vmap 在 th.SE3 log_map 上工作，由 @rmurai0610 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F495 中完成  \n* 调整收敛阈值…","2023-06-28T05:05:26",{"id":202,"version":203,"summary_zh":204,"released_at":205},90825,"0.1.4","本次代码发布也与 [arXiv v3 论文](https:\u002F\u002Farxiv.org\u002Fabs\u002F2207.09442v3) 的发布相关联。\n\n## 主要更新\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F360 中为 LM 自适应阻尼添加了稀疏求解器支持。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F392 中基于我们的算子实现了一个可微的稀疏矩阵-向量乘法。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F371 中实现了 Dogleg 方法。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F398 中添加了对批处理中权重为零的雅可比矩阵进行掩码的支持。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F424 中添加了一个用于实验性内容的 `labs` 包。\n\n## 其他变更\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F362 中修复了 SO2 中的一个 minor vmap 问题。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F363 中修改了 Objective.error()，使其可以在不改变向量化缓存的情况下进行向量化。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F372 中添加了 `test_theseus_layer` 损失中缺失的平方项。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F364 中为 LM 优化器添加了正确的接受\u002F拒绝逻辑。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F386 中清理了稀疏求解器代码。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F389 中移除了端到端测试中的 softmax，并进行了一些清理工作。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F388 中添加了一个针对 NonlinearOptimizer 拒绝所有批次步长的 workaround。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F390 中添加了自动选择 LUCuda 上下文数量的代码。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F396 中修复了使用 LUCudaSparseSolver 时 NonlinearOptimizer.reset() 的 bug。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F391 中允许浮点数据与我们的稀疏求解器扩展一起使用。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F393 中添加了对角线缩放方法，并重新启用了 LM 自适应 + 椭球方法。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F399 中添加了一个能够适应 torch.device 的计时工具。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F387 中将 setup.py 中的 torch.CUDA_GCC_VERSION 检查设置为可选。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F421 中修复了 black 和 wheel 脚本的错误。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F400 中修复了自动微分代价向量化中的 bug。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F401 中修改了 Objective.error()，当 also_update=False 时不再更新向量化状态。\n* @bamos 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F428 中将 flake8 更新至 GitHub 版本。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F431 中使用 IMPLICIT 替代 test_theseus_layer，并修复了相关 bug。\n* @luisenp 在 https:\u002F\u002F","2023-01-19T20:10:40",{"id":207,"version":208,"summary_zh":209,"released_at":210},90826,"0.1.3","## 主要更新\n* 由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F328 中实现的 Levenberg-Marquardt 自适应阻尼\n* 由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F352 中将所有单元测试移至单独文件夹\n\n## 其他变更\n* 由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F338 中移除了 CPU 测试的手动 CMake 安装\n* 由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F337 中修复了与 vmap 相关、导致使用稀疏求解器时单应性示例崩溃的 bug\n* 由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F336 中进行的小规模向量化改进\n* 由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F345 中调整 CI，以分别处理 torch >= 1.13 的情况\n* 由 @fantaosha 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F344 中修复了四元数在 π 时的 bug\n* 由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F335 中将李群检查暴露到根级别\n* 由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F351 中添加了使李群检查静默的选项\n* 由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F349 中向构建脚本添加了若干其他 CUDA 版本\n* 由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F350 中设置在不使用 TheseusLayer 的优化器时默认关闭向量化\n* 由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F353 中为 0.1.3 版本进行了一些进一步的清理\n* 由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F354 中在 CI 中添加了对 wheel 包的测试\n* #355 由 @thomasweng15 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F356 中为 UrdfRobotModel 添加了 device 参数\n* 由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F357 中将 th.device 扩展为同时支持字符串和 torch.device 类型\n* 由 @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F358 中更新至 0.1.3 版本\n\n## 新贡献者\n* @thomasweng15 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F356 中完成了首次贡献\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fcompare\u002F0.1.2...0.1.3","2022-11-09T19:52:51",{"id":212,"version":213,"summary_zh":214,"released_at":215},90827,"0.1.2","本次代码发布也与 [arXiv v2 论文](https:\u002F\u002Farxiv.org\u002Fabs\u002F2207.09442v2) 的发布相关联。\n\n## 主要更新\n* @maurimo 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F324 中添加了对 BaSpaCho 稀疏求解器的支持。\n* 将 vmap 设置为自动微分代价函数的默认自动求导模式。@luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F313 中完成此更改。\n\n## 其他变更\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F311 中修改了单应性变换示例，使其仅用于基准测试代价函数的计算。\n* @luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F312 中对所有文件运行 isort 格式化工具。\n* 添加了 usort:skip 标签。@luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F314 中完成此更改。\n* 修复了构建脚本中检出标签的语法错误。@luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F315 中完成此更改。\n* 删除了单应性变换 GIF 保存中的冗余目录。@luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F316 中完成此更改。\n* @Gralerfics 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F320 中修复了简单示例。\n* AutodiffCostFunction 现在会在运行 vmap 之前将批量大小为 1 的张量扩展。@luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F327 中完成此更改。\n* 废弃了 FULL 反向模式（现改为 UNROLL）。@luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F332 中完成此更改。\n* 为 CHOLMOD 求解器的 Python 文件使用了更清晰的命名。@luisenp 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F333 中完成此更改。\n\n## 新贡献者\n* @Gralerfics 在 https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fpull\u002F320 中做出了首次贡献。\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ftheseus\u002Fcompare\u002F0.1.1...0.1.2","2022-10-20T18:25:29"]