[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-rstudio--keras3":3,"tool-rstudio--keras3":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":80,"owner_twitter":79,"owner_website":81,"owner_url":82,"languages":83,"stars":100,"forks":101,"last_commit_at":102,"license":103,"difficulty_score":23,"env_os":104,"env_gpu":105,"env_ram":104,"env_deps":106,"category_tags":110,"github_topics":79,"view_count":10,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":111,"updated_at":112,"faqs":113,"releases":141},2620,"rstudio\u002Fkeras3","keras3","R Interface to Keras","keras3 是专为 R 语言用户打造的 Keras 接口，旨在让研究人员和开发者能在熟悉的 R 环境中轻松构建与训练深度学习模型。它解决了以往 R 用户在尝试前沿神经网络技术时，往往需要切换至 Python 或其他语言的痛点，实现了从创意构思到实验结果的高效闭环。\n\n无论是从事学术研究的数据科学家，还是希望将深度学习融入统计分析流程的工程师，都能通过 keras3 快速上手。该工具完美继承了 Keras 的核心优势：支持代码在 CPU 与 GPU 间无缝切换，无需修改即可加速计算；提供高度人性化的 API，帮助用户迅速原型化复杂的卷积网络（用于图像处理）或循环网络（用于序列分析）。此外，keras3 具备极强的架构灵活性，支持多输入输出、层共享及模型复用等高级特性，能够胜任从基础感知机到神经图灵机等各类复杂模型的构建。借助 keras3，R 语言社区得以直接利用全球领先的深度学习生态，让算法探索变得更加简单流畅。","# R interface to Keras\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frstudio_keras3_readme_c309c4c6a7bb.png)\n\n[![R-CMD-check](https:\u002F\u002Fgithub.com\u002Frstudio\u002Fkeras3\u002Factions\u002Fworkflows\u002FR-CMD-check.yaml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Frstudio\u002Fkeras3\u002Factions\u002Fworkflows\u002FR-CMD-check.yaml)\n[![CRAN_Status_Badge](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frstudio_keras3_readme_a1ac2bcfec66.png)](https:\u002F\u002Fcran.r-project.org\u002Fpackage=keras3)\n[![license](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fmashape\u002Fapistatus.svg?maxAge=2592000)](https:\u002F\u002Fgithub.com\u002Fkeras-team\u002Fkeras\u002Fblob\u002Fmaster\u002FLICENSE)\n\n[Keras](https:\u002F\u002Fkeras.io\u002F) is a high-level neural networks API developed with a focus on enabling fast experimentation. *Being able to go from idea to result with the least possible delay is key to doing good research.* Keras has the following key features:\n\n- Allows the same code to run on CPU or on GPU, seamlessly.\n\n- User-friendly API which makes it easy to quickly prototype deep learning models.\n\n- Built-in support for convolutional networks (for computer vision), recurrent networks (for sequence processing), and any combination of both.\n\n- Supports arbitrary network architectures: multi-input or multi-output models, layer sharing, model sharing, etc. This means that Keras is appropriate for building essentially any deep learning model, from a memory network to a neural Turing machine.\n\nSee the package website at \u003Chttps:\u002F\u002Fkeras3.posit.co> for complete documentation.\n\n","# R 语言对 Keras 的接口\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frstudio_keras3_readme_c309c4c6a7bb.png)\n\n[![R-CMD-check](https:\u002F\u002Fgithub.com\u002Frstudio\u002Fkeras3\u002Factions\u002Fworkflows\u002FR-CMD-check.yaml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Frstudio\u002Fkeras3\u002Factions\u002Fworkflows\u002FR-CMD-check.yaml)\n[![CRAN_Status_Badge](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frstudio_keras3_readme_a1ac2bcfec66.png)](https:\u002F\u002Fcran.r-project.org\u002Fpackage=keras3)\n[![license](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fmashape\u002Fapistatus.svg?maxAge=2592000)](https:\u002F\u002Fgithub.com\u002Fkeras-team\u002Fkeras\u002Fblob\u002Fmaster\u002FLICENSE)\n\n[Keras](https:\u002F\u002Fkeras.io\u002F) 是一个高级神经网络 API，专注于支持快速实验。*将想法迅速转化为成果的能力，是开展优秀研究的关键。* Keras 具有以下主要特性：\n\n- 支持同一段代码在 CPU 或 GPU 上无缝运行。\n\n- 提供用户友好的 API，便于快速构建深度学习模型原型。\n\n- 内置对卷积网络（用于计算机视觉）、循环网络（用于序列处理）以及两者的任意组合的支持。\n\n- 支持任意网络架构：多输入或多输出模型、层共享、模型共享等。这意味着 Keras 可以用于构建几乎任何深度学习模型，从记忆网络到神经图灵机。\n\n完整的文档请参阅软件包官网：\u003Chttps:\u002F\u002Fkeras3.posit.co>。","# Keras3 (R 接口) 快速上手指南\n\nKeras3 是 R 语言的高层神经网络 API 接口，旨在帮助用户快速进行深度学习实验。它支持在 CPU 和 GPU 上无缝运行，内置对卷积网络（计算机视觉）和循环网络（序列处理）的支持，并允许构建任意复杂的网络架构。\n\n## 环境准备\n\n*   **操作系统**：Windows、macOS 或 Linux。\n*   **前置依赖**：\n    *   已安装 **R** (建议版本 4.0 及以上)。\n    *   已安装 **RStudio** (推荐，提供更佳的开发体验)。\n    *   若需使用 GPU 加速，请确保系统已正确安装 CUDA 和 cuDNN（Keras3 会自动检测并配置后端）。\n\n## 安装步骤\n\n### 1. 从 CRAN 安装稳定版\n打开 R 或 RStudio，运行以下命令安装主包：\n\n```R\ninstall.packages(\"keras3\")\n```\n\n### 2. 初始化后端\n安装完成后，需要在 R 会话中安装并配置 Keras 的 Python 后端（默认使用 TensorFlow）。运行以下命令：\n\n```R\nlibrary(keras3)\ninstall_keras()\n```\n\n> **提示**：`install_keras()` 会自动创建一个独立的 Python 虚拟环境并安装所需的 TensorFlow 版本。如果您在中国大陆地区遇到下载缓慢的问题，可以尝试配置 pip 镜像源后再运行该命令，或在函数中指定镜像参数（如果版本支持），例如：\n> ```R\n> install_keras(pip_options = \"--index-url https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\")\n> ```\n\n## 基本使用\n\n以下是一个最简单的示例，展示如何使用 Keras3 构建并训练一个用于手写数字识别（MNIST 数据集）的神经网络模型。\n\n```R\nlibrary(keras3)\n\n# 1. 加载数据\nmnist \u003C- dataset_mnist()\nx_train \u003C- mnist$train$x\ny_train \u003C- mnist$train$y\nx_test \u003C- mnist$test$x\ny_test \u003C- mnist$test$y\n\n# 数据预处理：归一化并调整形状\nx_train \u003C- x_train \u002F 255\nx_test \u003C- x_test \u002F 255\nx_train \u003C- array_reshape(x_train, c(nrow(x_train), 28 * 28))\nx_test \u003C- array_reshape(x_test, c(nrow(x_test), 28 * 28))\n\n# 将标签转换为分类矩阵\ny_train \u003C- to_categorical(y_train, 10)\ny_test \u003C- to_categorical(y_test, 10)\n\n# 2. 构建模型\nmodel \u003C- keras_model_sequential() %>%\n  layer_dense(units = 512, activation = \"relu\", input_shape = c(28 * 28)) %>%\n  layer_dropout(rate = 0.2) %>%\n  layer_dense(units = 10, activation = \"softmax\")\n\n# 3. 编译模型\nmodel %>% compile(\n  optimizer = \"rmsprop\",\n  loss = \"categorical_crossentropy\",\n  metrics = c(\"accuracy\")\n)\n\n# 4. 训练模型\nhistory \u003C- model %>% fit(\n  x_train, y_train,\n  epochs = 5,\n  batch_size = 128,\n  validation_split = 0.2\n)\n\n# 5. 评估模型\nscores \u003C- model %>% evaluate(x_test, y_test)\ncat(\"Test loss:\", scores$loss, \"\\n\")\ncat(\"Test accuracy:\", scores$acc, \"\\n\")\n```\n\n运行上述代码后，您将看到一个简单的全连接神经网络被训练，并在测试集上输出准确率。","某生物制药公司的数据科学团队正利用 R 语言构建深度学习模型，以从显微镜图像中快速识别癌细胞变异特征。\n\n### 没有 keras3 时\n- 团队被迫在 R 与 Python 之间频繁切换，需额外编写复杂的接口代码来调用 TensorFlow，导致开发流程割裂且维护成本高昂。\n- 由于缺乏原生支持，尝试构建多输入或多输出的复杂神经网络架构时，代码冗长晦涩，调试困难重重。\n- 无法无缝利用 GPU 加速，模型训练只能依赖 CPU，处理高分辨率病理图像时耗时极长，严重拖慢实验迭代速度。\n- 原型验证周期过长，研究人员往往需要数天才能确认一个假设是否可行，错过了最佳的研究窗口期。\n\n### 使用 keras3 后\n- 直接在 R 环境中调用 Keras 高级 API，无需切换语言即可流畅完成从数据预处理到模型部署的全流程，代码逻辑清晰统一。\n- 借助其灵活的架构支持，轻松通过简洁代码实现层共享和多分支网络，快速搭建出适配复杂病理特征的高级模型。\n- 自动检测并调度底层硬件资源，同一套代码可无缝运行于 CPU 或 GPU 之上，将大规模图像训练时间从数天缩短至数小时。\n- 极大提升了“从想法到结果”的速度，研究人员能在一天内完成多次模型迭代与验证，显著加速了新药研发进程。\n\nkeras3 让 R 语言用户也能零门槛享受顶级深度学习框架的高效与灵活，真正实现了科研创意的即时变现。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frstudio_keras3_c309c4c6.png","rstudio","RStudio","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Frstudio_df187234.png","",null,"info@rstudio.org","http:\u002F\u002Frstudio.org","https:\u002F\u002Fgithub.com\u002Frstudio",[84,88,92,96],{"name":85,"color":86,"percentage":87},"R","#198CE7",99.5,{"name":89,"color":90,"percentage":91},"Python","#3572A5",0.3,{"name":93,"color":94,"percentage":95},"CSS","#663399",0.2,{"name":97,"color":98,"percentage":99},"JavaScript","#f1e05a",0.1,855,283,"2026-03-10T12:17:55","NOASSERTION","未说明","支持 CPU 和 GPU（具体型号、显存及 CUDA 版本未在 README 中明确，仅提及可无缝切换）",{"notes":107,"python":104,"dependencies":108},"这是 Keras 的 R 语言接口包。README 指出该工具允许代码在 CPU 或 GPU 上无缝运行，但未提供具体的硬件配置要求、Python 版本或详细的依赖库列表。完整文档需参考其官方网站。",[85,109],"Keras (后端)",[13],"2026-03-27T02:49:30.150509","2026-04-06T08:18:28.171277",[114,119,124,129,133,137],{"id":115,"question_zh":116,"answer_zh":117,"source_url":118},12124,"为什么 fit_generator() 的运行速度比 fit() 慢很多？","这是因为 R 代码无法在初始化 R 解释器的线程之外运行，导致生成数据时存在进程间通信开销。目前的限制使得直接在 R 中编写生成器会有性能损失。长期的解决方案是允许编写在 TensorFlow 图（多-threaded C++ 运行时）上执行的 R 预处理代码。暂时无法通过简单的优化使两者速度持平，因为将生成任务分发到子进程可能会因序列化开销而抵消并行带来的收益。","https:\u002F\u002Fgithub.com\u002Frstudio\u002Fkeras3\u002Fissues\u002F355",{"id":120,"question_zh":121,"answer_zh":122,"source_url":123},12125,"如何解决 'Python module was not found' 或 'ModuleNotFoundError: No module named tensorflow' 错误？","该错误通常由环境配置不匹配引起。解决步骤如下：\n1. 打开终端并激活 conda 环境：`conda activate r-tensorflow`。\n2. 确认当前使用的 python 版本属于该环境（使用 `where python` 或 `which python` 检查路径）。\n3. 在该环境中运行 python 并尝试导入 keras\u002Ftensorflow。如果报错如 `ImportError: libcublas.so...`，说明 CUDA 版本不匹配（例如安装了 9.2 但需要 9.0），需卸载并重新安装正确版本的 CUDA 和 cuDNN。\n4. 检查并删除可能干扰配置的 `~\u002F.bash_profile` 文件，并将环境变量添加到 `~\u002F.profile` 中。","https:\u002F\u002Fgithub.com\u002Frstudio\u002Fkeras3\u002Fissues\u002F102",{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},12126,"使用 predict_generator() 进行图像分类时程序卡死且无输出，怎么办？","这通常是因为生成器配置或模型输入不匹配导致的死锁。建议参考官方教程详细了解 `image_data_generators` 及其参数设置（见 TensorFlow 博客关于小数据集图像分类的文章）。确保 `flow_images_from_directory` 的参数（如 target_size, color_mode）与模型输入层完全一致。由于缺乏可复现的示例很难具体调试，请检查是否遗漏了必要的参数（如 steps 参数设置不当可能导致等待数据），或者尝试减少 `max_queue_size` 和 `workers` 数量来排查是否是多线程队列问题。","https:\u002F\u002Fgithub.com\u002Frstudio\u002Fkeras3\u002Fissues\u002F786",{"id":130,"question_zh":131,"answer_zh":132,"source_url":118},12127,"是否有方法可以加速 R 语言中的数据生成器（Generator）？","虽然 R 的单线程限制导致直接加速困难，但可以尝试使用 Python 的 `prefetch_generator` 库或在后台线程中预取结果。思路是将 R 生成的数据放入队列，当 Keras 请求下一个 mini-batch 时直接从队列获取，从而掩盖计算时间。实现上可能需要用 `@background` 装饰器包装 R 函数，或使用 R 的 `processx` 包结合类似 Python `Queue.Queue` 的机制，但这需要严格约束（如不能访问全局变量）以避免多线程问题。",{"id":134,"question_zh":135,"answer_zh":136,"source_url":118},12128,"如何在 R 中方便地将数组转换为数据框以用于模型训练？","推荐使用 `listarrays` 包中的 `split_along_rows()` 函数。它可以轻松地将 R 数组转换为适合模型输入的格式。示例代码如下：\n```r\nlibrary(listarrays)\nlibrary(tidyverse)\n# 假设 X, Y_1, Y_2 是数组\ndf \u003C- lst(X, Y_1, Y_2) %>%\n   split_along_rows() %>%\n   as_tibble()\n```\n这能简化数据整理过程，避免手动编写复杂的索引逻辑。",{"id":138,"question_zh":139,"answer_zh":140,"source_url":123},12129,"遇到 CUDA 库文件找不到（如 libcublas.so）的错误该如何处理？","这是典型的 CUDA 版本冲突问题。例如，系统安装了 CUDA 9.2，但 TensorFlow 编译时依赖的是 9.0。解决方法不要尝试建立软链接（symlinks），而是应该彻底卸载当前 CUDA 版本，重新安装与 TensorFlow 版本严格匹配的 CUDA 版本（如 9.0），随后安装对应的 cuDNN。安装完成后，务必重启终端并重新激活 conda 环境再运行代码。",[142,147,152,157,162,167,172,177,182,187,192,197,202,207,212,217,222,227,232,237],{"id":143,"version":144,"summary_zh":145,"released_at":146},62511,"v1.5.1","- 在 macOS 上，`use_backend(\"jax\")` 现在默认将 `gpu = FALSE`，因此不再自动选择 `jax-metal`。\n\n- JAX 现在为 `jax.core.Tracer` 对象注册了后端张量的 S3 方法，从而提升了 traced 计算的兼容性。\n\n- 在 Linux 上，解析 Python 依赖时，`tensorflow-cpu` 不再被固定为 `2.18.*` 版本。\n","2026-02-13T16:38:30",{"id":148,"version":149,"summary_zh":150,"released_at":151},62512,"v1.5.0","- `register_keras_serializable()` 现在会更新 R 层包装器，使其在调用时使用已注册的类。\n\n- 数值运算现在包括 `op_layer_normalization()`、`op_cbrt()`、`op_corrcoef()`、`op_deg2rad()`、`op_heaviside()`、`op_sparse_sigmoid()` 和 `activation_sparse_sigmoid()`。`op_dot_product_attention()` 新增了 `attn_logits_soft_cap` 参数。\n\n- 添加了信号窗函数操作：`op_bartlett()`、`op_blackman()`、`op_hamming()`、`op_hanning()` 和 `op_kaiser()`。\n\n- 添加了用于处理噪声标签训练的损失函数 `loss_categorical_generalized_cross_entropy()`。\n\n- 支持 LoRA 的层（`layer_dense()`、`layer_embedding()`、`layer_einsum_dense()`）新增了 `lora_alpha` 参数，用于在不改变所选秩的情况下独立缩放适应增量。\n\n- 添加了复数相关辅助函数：张量的 S3 `Arg()` 方法、`op_angle()` 以及转换函数 `op_view_as_real()` 和 `op_view_as_complex()`。\n\n- 通过 `optimizer_muon()` 添加了 Muon 优化器。\n\n- 为图像添加了弹性变形工具：`layer_random_elastic_transform()` 和更底层的 `op_image_elastic_transform()`。\n\n- 为 `PIL.Image.Image` 对象添加了 `as.array()` 支持。\n\n- 转置卷积工具现在遵循最新的 Keras API：`op_conv_transpose()` 默认步幅为 1，而 `layer_conv_*_transpose()` 层公开了 `output_padding` 参数，以便精确控制输出形状。\n\n- `register_keras_serializable()` 现在返回一个已注册的 Python 可调用对象，从而更方便与原生 R 函数一起使用。\n\n- `save_model_weights()` 新增了 `max_shard_size` 参数，用于将大型权重文件拆分为可管理的分片。\n\n- `keras_variable()` 现在接受用于分布式策略的 `synchronization` 参数。\n\n- `layer_layer_normalization()` 现在不再包含 `rms_scaling` 参数。\n\n- 合并层现在可以使用 tidy dots 捕获 `...` 参数（#1525）。\n\n- 当 JAX 的 `_DimExpr` 形状与 R 的双精度标量结合时，仍保持符号形式。\n\n- `layer_reshape()` 现在允许使用 `-1` 作为占位符，以自动计算某个轴的大小。\n\n- `layer_torch_module_wrapper()` 新增了 `output_shape` 参数，帮助 Keras 在包装 PyTorch 模块时推断形状。\n\n- `Layer$add_weight()` 新增了 `overwrite_with_gradient` 选项，且层现在提供了 `symbolic_call()` 方法。\n\n- 为 Keras 的 `Variable` 对象添加了 `str()` S3 方法。\n\n- JAX 数组现在支持 `str()`、`as.array()`、`as.double()`、`as.integer()` 和 `as.numeric()` 等 S3 方法。\n\n- 后端张量现在支持基础数组辅助函数：`t()`、`aperm()` 和 `all.equal()`。\n\n- 为 JAX 变量和 `JaxVariable` 添加了 `pillar::type_sum()`；同时，`str()` 方法也覆盖了新的 JAX 变量类。\n\n- 通过 `config_max_epochs()`、`config_set_max_epochs()`、`config_max_steps_per_epoch()` 和 `config_set_max_steps_per_epoch()` 添加了训练上限功能。这些上限也可以通过环境变量 `KERAS_MAX_EPOCHS` 和 `KERAS_MAX_STEPS_PER_EPOCH` 进行设置。此外，还添加了 `config_is_nnx_enabled()` 用于检查是否启用了 JAX NNX 功能。\n\n- 内置数据集加载器现在接受 `co","2026-02-01T16:19:17",{"id":153,"version":154,"summary_zh":155,"released_at":156},62513,"v2.16.0","- 针对与旧版 Keras 兼容性的更新 (#1515)。\n\n  - 现在会在包启动时显示一条消息，鼓励用户迁移到 keras3。\n  - 新增函数 `py_require_legacy_keras()`。\n  - `install_keras()` 现在会安装旧版 Keras `tf-keras`。\n  - 包启动时会自动设置环境变量 `TF_USE_LEGACY_KERAS=1`。\n\n- CRAN 版本的文档更新 (#1514)\n","2025-08-18T19:37:31",{"id":158,"version":159,"summary_zh":160,"released_at":161},62514,"v1.4.0","- 新增 `op_subset()` 和 `x@r[...]` 方法，支持使用 R 的 `[` 语义和惯用法对张量进行子集化。\n\n- 为张量实现了新的子集赋值方法：\n    `op_subset(x, ...) \u003C- value` 和 `x@r[...] \u003C- value`\n\n- 破坏性变更：所有以 `op_` 为前缀的操作现在默认返回基于 1 的索引。以下返回或接收索引的函数已更改：\n    `op_argmax()`、`op_argmin()`、`op_top_k()`、`op_argpartition()`、\n    `op_searchsorted()`、`op_argsort()`、`op_digitize()`、`op_nonzero()`、\n    `op_split()`、`op_trace()`、`op_swapaxes()`、`op_ctc_decode()`、\n    `op_ctc_loss()`、`op_one_hot()`、`op_arange()`\n\n- `op_arange()` 现在与 `base::seq()` 的语义一致。默认情况下，它从起始值开始，包含结束值，并自动推断步进方向。\n\n- `op_one_hot()` 现在如果传入因子类型数据，会自动推断 `num_classes`。\n\n- `op_hstack()` 和 `op_vstack()` 现在接受通过 `...` 传递的参数。\n\n- `application_decode_predictions()` 现在默认返回处理后的数据框；如果预测缺失，则返回解码函数。\n\n- `application_preprocess_inputs()` 如果输入缺失，则返回预处理函数。\n\n- 文档中新增了多个示例，包括 `op_scatter()`、`op_switch()` 和 `op_nonzero()`。\n\n- 引入了新的 `x@py[...]` 访问器，用于以 Python 风格的基于 0 的索引访问张量。\n\n- 新增了 `Summary` 组泛化方法 `keras_shape`，支持类似 `prod(shape(3, 4))` 的用法。\n\n- 如果 `~\u002F.keras` 目录不存在且未设置 `KERAS_HOME` 环境变量，则 `KERAS_HOME` 将被设置为 `tools::R_user_dir(\"keras3\", \"cache\")`。\n\n- 新增 `op_convert_to_array()` 函数，用于将张量转换为 R 数组。\n\n- 增加了对 Keras v3.9.2 的兼容性。\n  - 新增操作：\n    - `op_rot90()`\n    - `op_rearrange()`（Einops 风格）\n    - `op_signbit()`\n    - `op_polar()`\n    - `op_image_perspective_transform()`\n    - `op_image_gaussian_blur()`\n  - 新增层：\n    - `layer_rms_normalization()`\n    - `layer_aug_mix()`\n    - `layer_cut_mix()`\n    - `layer_random_invert()`\n    - `layer_random_erasing()`\n    - `layer_random_gaussian_blur()`\n    - `layer_random_perspective()`\n  - `layer_resizing()` 新增了 `antialias` 参数。\n  - `keras_input()`、`keras_model_sequential()` 和 `op_convert_to_tensor()` 新增了 `ragged` 参数。\n  - `layer$pop_layer()` 新增了 `rebuild` 参数，现在会返回被移除的层。\n  - 为 `Layer` 对象新增了 `rematerialized_call()` 方法。\n  - 文档改进及一些小修复。\n\n- 修复了 `op_shape()` 有时会返回 TensorFlow `TensorShape` 的问题。\n\n- 修复了 `metric_iou()`、`op_top_k()` 和 `op_eye()` 在使用 R 原子双精度浮点数调用时出现的问题。","2025-05-05T13:01:03",{"id":163,"version":164,"summary_zh":165,"released_at":166},62515,"v1.3.0","- Keras 现在使用 `reticulate::py_require()` 来解析 Python 依赖项。\n  调用 `install_keras()` 已不再必要（但仍受支持）。\n\n- `use_backend()` 新增了 `gpu` 参数，用于指定是否应由 `py_require()` 解析具备 GPU 功能的依赖项集合。\n\n- `fit()`、`evaluate()` 和 `predict()` 中的进度条现在默认在 testthat 测试期间不显示。\n\n- `dotty::.` 现在被重新导出。\n\n- `%*%` 现在会分派到针对 TensorFlow 张量的 `op_matmul()`，该函数相比 `tf$matmul()` 放宽了形状约束。\n\n- 修复了一个问题：当使用未命名参数调用 `Metric` 和 `Loss` 对象时会引发错误。\n\n## 增加了对 Keras v3.8.0 的兼容性。面向用户的变更：\n\n- 新符号：\n  - `activation_sparse_plus()`\n  - `activation_sparsemax()`\n  - `activation_threshold()`\n  - `layer_equalization()`\n  - `layer_mix_up()`\n  - `layer_rand_augment()`\n  - `layer_random_color_degeneration()`\n  - `layer_random_color_jitter()`\n  - `layer_random_grayscale()`\n  - `layer_random_hue()`\n  - `layer_random_posterization()`\n  - `layer_random_saturation()`\n  - `layer_random_sharpness()`\n  - `layer_random_shear()`\n  - `op_diagflat()`\n  - `op_sparse_plus()`\n  - `op_sparsemax()`\n  - `op_threshold()`\n  - `op_unravel_index()`\n\n- 向 Tversky 损失函数添加了 `axis` 参数。\n- 新增功能：通过 `export_savedmodel()` 导出 ONNX 模型。\n- 文档改进及错误修复。\n- JAX 特定变更：增加对 JAX 命名作用域的支持。\n- TensorFlow 特定变更：使 `random_shuffle()` 可以被 XLA 编译。\n\n\n## 增加了对 Keras v3.7.0 的兼容性。面向用户的变更：\n\n### 新函数\n\n#### 激活函数\n- `activation_celu()`\n- `activation_glu()`\n- `activation_hard_shrink()`\n- `activation_hard_tanh()`\n- `activation_log_sigmoid()`\n- `activation_soft_shrink()`\n- `activation_squareplus()`\n- `activation_tanh_shrink()`\n\n#### 配置\n- `config_disable_flash_attention()`\n- `config_enable_flash_attention()`\n- `config_is_flash_attention_enabled()`\n\n#### 层与初始化器\n- `initializer_stft()`\n- `layer_max_num_bounding_boxes()`\n- `layer_stft_spectrogram()`\n\n#### 损失与指标\n- `loss_circle()`\n- `metric_concordance_correlation()`\n- `metric_pearson_correlation()`\n\n#### 操作\n- `op_celu()`\n- `op_exp2()`\n- `op_glu()`\n- `op_hard_shrink()`\n- `op_hard_tanh()`\n- `op_ifft2()`\n- `op_inner()`\n- `op_soft_shrink()`\n- `op_squareplus()`\n- `op_tanh_shrink()`\n\n#### 新参数\n\n* `callback_backup_and_restore()`：新增 `double_checkpoint` 参数，用于保存备用检查点。\n* `callback_tensorboard()`：新增对 `profile_batch` 参数的支持。\n* `layer_group_query_attention()`：新增 `flash_attention` 和 `seed` 参数。\n* `layer_multi_head_attention()`：新增 `flash_attention` 参数。\n* `metric_sparse_top_k_categorical_accuracy()`：新增 `from_sorted_ids` 参数。\n\n### 性能提升\n\n* 在 JAX 后端中为 GPU（通过 cuDNN）和 TPU（通过 Pallas 内核）增加了原生 Flash Attention 支持。\n* 为 GPU 增加了可选的原生 Flash Attention 支持。","2025-03-03T11:50:31",{"id":168,"version":169,"summary_zh":170,"released_at":171},62516,"v1.2.0","- 增加了对 Keras v3.5.0 的兼容性。面向用户的变更：\n\n  - 新增函数：\n    - `op_associative_scan()`\n    - `op_searchsorted()`\n    - `optimizer_lamb()`\n  - `keras$DTypePolicy` 实例现在可以传递给损失函数、指标和层的 `dtype` 参数。\n  - 添加了与 Hugging Face Hub 的集成。现在可以直接使用 `save_model()` 将模型保存到 Hugging Face Hub，并使用 `load_model()` 直接从 Hugging Face Hub 加载 .keras 格式的模型。\n  - 增加了对 NumPy 2.0 的兼容性。\n  - 改进了 `keras$distribution` API 对超大规模模型的支持。\n  - 修复了若干 bug 并提升了性能。\n  - 为 `layer_zero_padding_1d()` 层新增了 `data_format` 参数。\n  - 其他文档方面的改进。\n  - 修复了若干 bug 并提升了性能。","2024-09-06T11:46:16",{"id":173,"version":174,"summary_zh":175,"released_at":176},62517,"v1.1.0","- 修复了在 Windows 上通过 WSL 运行 Linux 时无法检测到 GPU 的问题。\n  （该问题曾在 #1456 中报告，已在 #1459 中修复）\n\n- `keras_shape` 对象（由 `keras3::shape()` 返回）新增了 `==` 和 `!=` 方法。\n\n- 修复了 `tfruns::training_run()` 在无法记录优化器学习率时产生的警告。\n\n- 增加了对 Keras v3.4.1 的兼容性（未对外部 R 用户产生影响）。\n\n- 增加了对 Keras v3.4.0 的兼容性。对外部用户的影响如下：\n\n  - 新增函数：\n    - `op_argpartition()`\n    - `op_map()`\n    - `op_scan()`\n    - `op_switch()`\n    - `op_dtype()`\n    - `op_lstsq()`\n    - `op_image_hsv_to_rgb()`\n    - `op_image_rgb_to_hsv()`\n\n  - 变更：\n    - 在 Functional 模型中增加了对任意深度嵌套的输入\u002F输出结构的支持\n      （例如，输入或输出可以是多层嵌套的列表……）\n    - 新增对 Functional 输入使用 `optional` 属性的支持。\n      - `keras_input()` 新增 `optional` 参数。\n      - `keras_model_sequential()` 新增 `input_optional` 参数。\n    - 为 `Dense` 和 `EinsumDense` 层增加了对 `float8` 精度推理的支持。\n    - 允许在后端非 TensorFlow 的情况下，将 `layer_feature_space()` 用于 `{tfdatasets}` 数据管道。\n    - `layer_string_lookup()` 现在可以接受 `tf$SparseTensor()` 作为输入。\n    - `layer_string_lookup()` 在更多模式下默认返回 `\"int64\"` 数据类型。\n    - `Layer()` 实例新增了 `path` 和 `quantization_mode` 属性。\n    - `Metric()$variables` 现在变为递归属性。\n    - 为 `Model$compute_loss()` 新增了 `training` 参数。\n    - `split_dataset()` 现在支持数据集中的嵌套结构。\n    - 所有应用都新增了 `name` 参数，允许用户自定义名称。\n    - `layer_multi_head_attention()` 新增了 `seed` 参数。\n    - 所有损失函数新增了 `dtype` 参数。\n    - `loss_dice()` 新增了 `axis` 参数。\n    - `op_ctc_decode()` 将 `mask_index` 的默认值修改为 0。\n    - 所有 `op_image_*` 函数现在都使用与 `config_image_data_format()` 相同的默认 `data_format` 值。\n    - `op_isclose()` 新增了 `rtol`、`atol` 和 `equal_nan` 参数。\n    - `save_model()` 新增了 `zipped` 参数。\n    - 修复了一些 bug，并提升了性能。","2024-07-17T13:54:04",{"id":178,"version":179,"summary_zh":180,"released_at":181},62518,"v1.0.0","- 使用 `|>` 连接的 `layer_*` 调用链现在会按照与 `%>%` 管道链相同的顺序实例化层：从左到右依次进行 (#1440)。\n\n- `iterate()`、`iter_next()` 和 `as_iterator()` 现在已从 reticulate 包中重新导出。\n\n\n与上游 Keras v3.3.3 相关的用户可见变更：\n\n- 新函数：`op_slogdet()`、`op_psnr()`\n- `clone_model()` 增加了新参数：`call_function`、`recursive`，并更新了示例用法。\n- `op_ctc_decode()` 的 `strategy` 参数新增默认值：“greedy”。文档也已更新。\n- `loss_ctc()` 的默认名称已修正，改为“ctc”。\n\n与上游 Keras v3.3.2 相关的用户可见变更：\n\n- 新函数：`op_ctc_decode()`、`op_eigh()`、`op_select()`、`op_vectorize()`、`op_image_rgb_to_grayscale()`、`loss_tversky()`\n- 新参数：`layer_resizing(pad_to_aspect_ratio, fill_mode, fill_value)`；`layer_embedding(weights)` 用于提供初始权重矩阵。\n- 新参数：`op_nan_to_num(nan, posinf, neginf)`；`op_image_resize(crop_to_aspect_ratio, pad_to_aspect_ratio, fill_mode, fill_value)`；`op_argmax(keepdims)` 和 `op_argmin(keepdims)`。\n- 新参数：`clear_session(free_memory)`，用于在不触发垃圾回收器的情况下清空会话。\n- `metric_kl_divergence()` 和 `loss_kl_divergence()` 会将输入（`y_true` 和 `y_pred`）截断到 `[0, 1]` 范围内。\n- `Layer()` 类新增属性：`metrics`、`dtype_policy`。\n- 初步支持 float8 精度的训练。\n- `layer_conv_*d()` 层现支持 LoRa 技术。\n- `op_digitize()` 现在支持稀疏张量。\n- 模型和层现在会递归地返回其拥有的指标。\n- 为 Keras 模型添加了 pickle 支持（例如通过 `reticulate::py_save_object()`）。请注意，不建议使用 pickle，推荐使用 Keras 的保存 API。","2024-05-21T17:13:46",{"id":183,"version":184,"summary_zh":185,"released_at":186},62519,"v2.15.0","- 现在，通过 `install_keras()` 安装的默认 TensorFlow\u002FKeras 版本为 2.15。这是 Keras 2 仍作为默认版本的最后一个 TensorFlow 版本。若需在 TensorFlow 2.16 及更高版本中使用 Keras，请使用新的 {keras3} R 包。\n\n- 更新以支持同时加载 {keras} 和 {keras3} 这两个 R 包。\n\n- 针对 R-devel（4.4）的更新。\n","2024-04-23T12:59:56",{"id":188,"version":189,"summary_zh":190,"released_at":191},62520,"v0.2.0","新功能：\n\n  - `quantize_weights()`: 将模型或层的权重就地量化。目前仅支持 `Dense`、`EinsumDense` 和 `Embedding` 层（这已足以覆盖当今大多数 Transformer 模型）。\n  - `layer_mel_spectrogram()`\n  - `layer_flax_module_wrapper()`\n  - `layer_jax_model_wrapper()`\n\n  - `loss_dice()`\n\n  - `random_beta()`\n  - `random_binomial()`\n\n  - `config_set_backend()`: 在 Keras 初始化后更改后端。\n  - `config_dtype_policy()`\n  - `config_set_dtype_policy()`\n\n  - 新的操作\n    - `op_custom_gradient()`\n    - `op_batch_normalization()`\n    - `op_image_crop()`\n    - `op_divide_no_nan()`\n    - `op_normalize()`\n    - `op_correlate()`\n    - `\n  - 线性代数操作的新系列\n    - `op_cholesky()`\n    - `op_det()`\n    - `op_eig()`\n    - `op_inv()`\n    - `op_lu_factor()`\n    - `op_norm()`\n    - `op_erfinv()`\n    - `op_solve_triangular()`\n    - `op_svd()`\n\n- `audio_dataset_from_directory()`、`image_dataset_from_directory()` 和 `text_dataset_from_directory()` 增加了 `verbose` 参数（默认为 `TRUE`）。\n\n- `image_dataset_from_directory()` 增加了 `pad_to_aspect_ratio` 参数（默认为 `FALSE`）。\n\n- `to_categorical()`、`op_one_hot()` 和 `fit()` 现在可以接受 R 因子，并将其偏移为从 0 开始（参见 `#1055`）。\n\n- `op_convert_to_numpy()` 现在返回未转换的 NumPy 数组。\n\n- `op_array()` 和 `op_convert_to_tensor()` 在将 R 双精度值强制转换为整数类型时不再报错。\n\n- `export_savedmodel()` 现在支持 Jax 后端。\n\n- `Metric()$add_variable()` 方法新增参数：`aggregration`。\n- `Layer()$add_weight()` 方法新增参数：`autocast`、`regularizer`、`aggregation`。\n\n- `op_bincount()`、`op_multi_hot()`、`op_one_hot()` 和 `layer_category_encoding()` 现在支持稀疏张量。\n\n- `op_custom_gradient()` 现在支持 PyTorch 后端。\n\n- `layer_lstm()` 和 `layer_gru()` 增加了 `use_cudnn` 参数，默认值为 `'auto'`。\n\n- 修复了一个问题：当 `application_preprocess_inputs()` 接收到 R 数组作为输入时会报错。\n\n- 文档改进。","2024-04-18T13:45:18",{"id":193,"version":194,"summary_zh":195,"released_at":196},62521,"v0.1.0","- The package has been rebuilt for Keras 3.0. Refer to \u003Cblogpost> for an overview\n  and https:\u002F\u002Fkeras.posit.co for the current up-to-date documentation.\n","2024-02-19T13:55:53",{"id":198,"version":199,"summary_zh":200,"released_at":201},62522,"v2.13.0","- Default TF version installed by `install_keras()` is now 2.13.\n\n- Updated layers:\n  - `layer_batch_normalization()` updated signature, with changes to options for distributed training.\n  - `layer_embedding()` gains a `sparse` argument.\n\n- Fixed deadlock when an R generator was passed to `fit()`, `predict()`, and other endpoints.\n\n- When `fit(verbose = \"auto\")` is evaluated in the context of a knitr document \n  (e.g., quarto or rmarkdown document being rendered), verbose will now \n  default to `2`, showing one line per epoch.\n","2023-08-15T21:13:16",{"id":203,"version":204,"summary_zh":205,"released_at":206},62523,"v2.11.1","- Update S3 method formals per new CRAN requirement (`r_to_py.keras_layer_wrapper()`)\n","2023-03-23T18:45:34",{"id":208,"version":209,"summary_zh":210,"released_at":211},62524,"v2.11.0","- Default TensorFlow version installed by `install_keras()` is now 2.11. \r\n\r\n- All optimizers have been updated for Keras\u002FTensorFlow version 2.11.\r\n  Arguments to all the optimizers have changed. To access the previous\r\n  optimizer implementations, use the constructors available at\r\n  `keras$optimizers$legacy`. For example, use `keras$optimizers$legacy$Adam()`\r\n  for the previous implementation of `optimizer_adam()`.\r\n\r\n- New optimizer `optimizer_frtl()`.\r\n\r\n- updates to layers:\r\n  - `layer_attention()` gains `score_mode` and `dropout` arguments.\r\n  - `layer_discretization()` gains `output_mode` and `sparse` arguments.\r\n  - `layer_gaussian_dropout()` and `layer_gaussian_noise()` gain a `seed` argument.\r\n  - `layer_hashing()` gains `output_mode` and `sparse` arguments.\r\n  - `layer_integer_lookup()` gains `vocabulary_dtype` and `idf_weights` arguments.\r\n  - `layer_normalization()` gains an `invert` argument.\r\n  - `layer_string_lookup()` gains an `idf_weights` argument.\r\n\r\n- Fixed issue where `input_shape` supplied to custom layers defined with `new_layer_class()`  \r\n  would result in an error (#1338)\r\n\r\n- New `callback_backup_and_restore()`, for resuming an interrupted `fit()` call.\r\n\r\n- The merging family of layers (`layer_add`, `layer_concatenate`, etc.) gain the ability\r\n  to accept layers in `...`, allowing for easier composition of residual blocks with the pipe `%>%`.\r\n  e.g. something like this now works:\r\n  ```r\r\n  block_1_output \u003C- ...\r\n  block_2_output \u003C- block_1_output %>% \r\n    layer_conv_2d(64, 3, activation = \"relu\", padding = \"same\") %>% \r\n    layer_add(block_1_output)\r\n  ```\r\n  \r\n- `model$get_config()` method now returns an R object that can be safely serialized \r\n  to rds.\r\n  \r\n- `keras_array()` now reflects unconverted Python objects. This enables passing\r\n  objects like `pandas.Series()` to `fit()` and `evaluate()` methods. (#1341)\r\n","2022-12-20T15:38:24",{"id":213,"version":214,"summary_zh":215,"released_at":216},62525,"v2.9.0","- New functions for constructing custom keras subclasses:\r\n  - `new_model_class()`\r\n  - `new_layer_class()`\r\n  - `new_callback_class()`\r\n  - `new_metric_class()`\r\n  - `new_loss_class()`\r\n  - `new_learning_rate_schedule_class()`.\r\n\r\n  Also provided is `mark_active()`, a decorator for indicating a class method\r\n  should be an active binding (i.e., decorated with Python's `@property`).\r\n  `mark_active()` can be used in the `new_*_class` family of class constructors\r\n  as well as `%py_class%`.\r\n  \r\n-  `r_to_py()` method for R6 classes and `%py_class%` gain support for\r\n  `private` fields and methods. Any R objects stored in `private` will only be\r\n  available to methods, and will not be converted to Python.\r\n\r\n- New family of functions for controlling optimizer learning rates during training:\r\n  -  `learning_rate_schedule_cosine_decay()`\r\n  -  `learning_rate_schedule_cosine_decay_restarts()`\r\n  -  `learning_rate_schedule_exponential_decay()`\r\n  -  `learning_rate_schedule_inverse_time_decay()`\r\n  -  `learning_rate_schedule_piecewise_constant_decay()`\r\n  -  `learning_rate_schedule_polynomial_decay()`\r\n\r\n  Also, a function for constructing custom learning rate schedules:\r\n  `new_learning_rate_schedule_class()`.\r\n\r\n- New L2 unit normilization layer: `layer_unit_normalization()`.\r\n\r\n- New `regularizer_orthogonal`, a regularizer that encourages \r\n  orthogonality between the rows (or columns) or a weight matrix.\r\n\r\n- New `zip_lists()` function for transposing lists, optionally matching by name.\r\n\r\n- New `plot()` S3 method for models.\r\n- `pydot` is now included in the packages installed by `install_keras()`.\r\n- The `png` package is now listed under Suggests.\r\n\r\n- The `%\u003C>%` assignment pipe from magrittr is exported.\r\n\r\n- `format()` method for keras models (and derivative methods `print()`, `summary()`,\r\n  `str()`, and `py_str()`):\r\n    - gain a new arg `compact`. If `TRUE` (the default) white-space only\r\n      lines are stripped out of `model.summary()`.\r\n    - If any layers are marked non-trainable or frozen, the model summary\r\n      now includes a \"Trainable\" column, indicating if a layer is frozen.\r\n\r\n- `freeze_weights()` and `unfreeze_weights()`:\r\n  - gain a flexible `which` argument that can accept layer names (as character strings),\r\n    an integer vector, a boolean vector, or a function that returns a boolean\r\n    when called with a layer. (see updated examples in `?freeze_weights`\r\n  - `from` and `to` arguments gain the ability to accept negative integers,\r\n     to specify layers counting from the end of the layers list.\r\n\r\n- `get_weights()` gains a `trainable` argument that can accept `TRUE` or `FALSE`,\r\n  allowing for returning only the unfrozen or frozen weights, respectively.\r\n\r\n- `timeseries_dataset_from_array()`:\r\n    - R arrays are now cast to the floatx dtype (\"float32\" by default)\r\n    - `start_index` and `end_index` now are 1-based.\r\n\r\n- `image_dataset_from_directory()` gains a `crop_to_aspect_ratio` argument which\r\n  can be used to prevent distorting images when resizing to a new aspect ratio.\r\n\r\n- `Layer` is deprecated, superseded by `new_layer_class()`.\r\n\r\n- `load_model_tf()` argument `custom_objects` gains the ability to accept an\r\n  unnamed list (e.g, of objects returned by `new_layer_class()` or similar).\r\n  Appropriate names for the supplied objects are automatically inferred.\r\n\r\n- Fixed an issue where negative values less than -1 supplied to `axis`\r\n  arguments were selecting the wrong axis.\r\n\r\n- `get_layer()` gains the ability to accept negative values for the `index` argument.\r\n\r\n- Fixed warning from `create_layer_wrapper()` when the custom layer didn't have\r\n  an overridden `initialize` or `__init__` method.\r\n\r\n- Backend functions:\r\n  - k_clip() `min_value` and `max_value` gain default values of `NULL`,\r\n    can be omitted. `NULL` is taken as -Inf or Inf, respectively.\r\n  - k_squeeze(): `axis` argument can be omitted, in which case all axes of size 1 are dropped.\r\n  - k_tile(): `n` argument can now be supplied as a tensor.\r\n  - New function `k_unstack()`.\r\n\r\n- KerasTensor objects (e.g, returned by `layer_input()`) now inherit S3 methods\r\n  for `\"tensorflow.tensor\"`.\r\n  \r\n- `plot.keras_training_history()` no longer issues message \r\n  ``` `geom_smooth()` using formula 'y ~ x' ``` when `method = \"ggplot2\"`.\r\n  \r\n- `print` and related methods for models (`format`, `summary`) now accept \r\n   a `width` argument.\r\n\r\n- `evaluate()`, `fit()`, and `predict()` methods for keras Models now default \r\n  to `verbose = \"auto\"`, with verbosity adjusted appropriately based on calls to \r\n  `keras$utils$disable_interactive_logging()`, and contexts like \r\n  `ParameterServerStrategy`.\r\n\r\n- `install_keras()` now accepts `version = \"release-cpu\"` as a valid specification.\r\n","2022-05-23T20:34:14",{"id":218,"version":219,"summary_zh":220,"released_at":221},62526,"v2.8.0","- Breaking change: The semantics of passing a named list to `keras_model()` have changed.\r\n\r\n  Previously, `keras_model()` would `unname()` supplied `inputs` and `outputs`.\r\n  Then, if a named list was passed to subsequent `fit()`\u002F`evaluate()`\u002F`call()`\u002F`predict()` invocations, matching of `x` and `y` was done to the model's input and outpt `tensor$name`'s.\r\n  Now, matching is done to `names()` of `inputs` and\u002For `outputs` supplied to `keras_model()`.\r\n  Call `unname()` on `inputs` and `outputs` to restore the old behavior, e.g.:\r\n    ```\r\n    keras_model(unname(inputs), unname(outputs))\r\n    ```\r\n\r\n  `keras_model()` can now accept a named list for multi-input and\u002For multi-output\r\n  models. The named list is converted to a `dict` in python.\r\n   (Requires Tensorflow >= 2.4, Python >= 3.7).\r\n\r\n  If `inputs` is a named list:\r\n    - `call()`, `fit()`, `evaluate()`, and `predict()` methods can also\r\n    accept a named list for `x`, with names matching to the\r\n    names of `inputs` when the model was constructed.\r\n    Positional matching of `x` is still also supported (requires python 3.7+).\r\n\r\n  If `outputs` is a named list:\r\n    - `fit()` and `evaluate()` methods can *only*\r\n    accept a named list for `y`, with names matching to the\r\n    names of `outputs` when the model was constructed.\r\n\r\n- New layer `layer_depthwise_conv_1d()`.\r\n\r\n- Models gain `format()` and `print()` S3 methods for compatibility\r\n  with the latest reticulate. Both are powered by `model$summary()`.\r\n\r\n- `summary()` method for Models gains arguments `expand_nested` and `show_trainable`,\r\n  both default to `FALSE`.\r\n\r\n- `keras_model_custom()` is soft deprecated. Please define custom models by\r\n  subclassing `keras$Model` directly using `%py_class%` or `R6::R6Class()`.\r\n\r\n- Fixed warning issued by `k_random_binomial()`.\r\n\r\n- Fixed error raised when `k_random_binomial()` was passed a non-floating dtype.\r\n\r\n- Added `k_random_bernouli()` as an alias for `k_random_binomial()`.\r\n\r\n- `image_load()` gains a `color_mode` argument.\r\n\r\n- Fixed issue where `create_layer_wrapper()` would not include arguments\r\n  with a `NULL` default value in the returned wrapper.\r\n\r\n- Fixed issue in `r_to_py.R6ClassGenerator` (and `%py_class%`) where\r\n  single-expression `initialize` functions defined without `{` would error.\r\n\r\n- Deprecated functions are no longer included in the package documentation index.\r\n","2022-02-10T13:01:51",{"id":223,"version":224,"summary_zh":225,"released_at":226},62527,"v2.7.0","- Default Tensorflow + Keras version is now 2.7.\r\n\r\n- New API for constructing RNN (Recurrent Neural Network) layers. This is a\r\n  flexible interface that complements the existing RNN layers. It is primarily\r\n  intended for advanced \u002F research applications, e.g, prototyping novel\r\n  architectures. It allows you to compose a RNN with a custom \"cell\", a Keras layer that\r\n  processes one step of a sequence.\r\n  New symbols:\r\n    - `layer_rnn()`, which can compose with builtin cells:\r\n    - `layer_gru_cell()`\r\n    - `layer_lstm_cell()`\r\n    - `layer_simple_rnn_cell()`\r\n    - `layer_stacked_rnn_cells()`\r\n  To learn more, including how to make a custom cell layer, see the new vignette:\r\n  \"Working with RNNs\".\r\n\r\n- New dataset functions:\r\n  - `text_dataset_from_directory()`\r\n  - `timeseries_dataset_from_array()`\r\n\r\n- New layers:\r\n  - `layer_additive_attention()`\r\n  - `layer_conv_lstm_1d()`\r\n  - `layer_conv_lstm_3d()`\r\n\r\n- `layer_cudnn_gru()` and `layer_cudnn_lstm()` are deprecated.\r\n  `layer_gru()` and `layer_lstm()` will automatically use CuDNN if it is available.\r\n\r\n- `layer_lstm()` and `layer_gru()`:\r\n  default value for `recurrent_activation` changed\r\n  from `\"hard_sigmoid\"` to `\"sigmoid\"`.\r\n\r\n- `layer_gru()`: default value `reset_after` changed from `FALSE` to `TRUE`\r\n\r\n- New vignette: \"Transfer learning and fine-tuning\".\r\n\r\n- New applications:\r\n  - MobileNet V3: `application_mobilenet_v3_large()`, `application_mobilenet_v3_small()`\r\n  - ResNet: `application_resnet101()`, `application_resnet152()`, `resnet_preprocess_input()`\r\n  - ResNet V2:`application_resnet50_v2()`, `application_resnet101_v2()`,\r\n              `application_resnet152_v2()` and `resnet_v2_preprocess_input()`\r\n  - EfficientNet: `application_efficientnet_b{0,1,2,3,4,5,6,7}()`\r\n\r\n- Many existing `application_*()`'s gain argument `classifier_activation`,\r\n  with default `'softmax'`.\r\n  Affected: `application_{xception, inception_resnet_v2, inception_v3, mobilenet, vgg16, vgg19}()`\r\n\r\n- New function `%\u003C-active%`, a ergonomic wrapper around `makeActiveBinding()`\r\n  for constructing Python `@property` decorated methods in `%py_class%`.\r\n\r\n- `bidirectional()` sequence processing layer wrapper gains a `backwards_layer` arguments.\r\n\r\n- Global pooling layers `layer_global_{max,average}_pooling_{1,2,3}d()` gain a\r\n  `keepdims` argument with default value `FALSE`.\r\n\r\n- Signatures for layer functions are in the process of being simplified.\r\n  Standard layer arguments are moving to `...` where appropriate\r\n  (and will need to be provided as named arguments).\r\n  Standard layer arguments include:\r\n    `input_shape`, `batch_input_shape`, `batch_size`, `dtype`,\r\n    `name`, `trainable`, `weights`.\r\n  Layers updated:\r\n    `layer_global_{max,average}_pooling_{1,2,3}d()`,\r\n    `time_distributed()`, `bidirectional()`,\r\n    `layer_gru()`, `layer_lstm()`, `layer_simple_rnn()`\r\n\r\n- All the backend function with a shape argument `k_*(shape =)` that now accept a\r\n  a mix of integer tensors and R numerics in the supplied list.\r\n\r\n- All layer functions now accept `NA` as a synonym for `NULL` in arguments\r\n  that specify shape as a vector of dimension values,\r\n  e.g., `input_shape`, `batch_input_shape`.\r\n\r\n- `k_random_uniform()` now automatically casts `minval` and `maxval` to the output dtype.\r\n\r\n- `install_keras()` gains arg with default `pip_ignore_installed = TRUE`.\r\n","2021-11-09T19:56:42",{"id":228,"version":229,"summary_zh":230,"released_at":231},62528,"v2.6.1","- New family of *preprocessing* layers. These are the spiritual successor to the `tfdatasets::step_*` family of data transformers (to be deprecated in a future release). See the new vignette \"Working with Preprocessing Layers\" for details.\r\n  New functions:\r\n\r\n  Image preprocessing:\r\n    - `layer_resizing()`\r\n    - `layer_rescaling()`\r\n    - `layer_center_crop()`\r\n\r\n  Image augmentation:\r\n    - `layer_random_crop()`\r\n    - `layer_random_flip()`\r\n    - `layer_random_translation()`\r\n    - `layer_random_rotation()`\r\n    - `layer_random_zoom()`\r\n    - `layer_random_contrast()`\r\n    - `layer_random_height()`\r\n    - `layer_random_width()`\r\n\r\n  Categorical features preprocessing:\r\n    - `layer_category_encoding()`\r\n    - `layer_hashing()`\r\n    - `layer_integer_lookup()`\r\n    - `layer_string_lookup()`\r\n\r\n  Numerical features preprocessing:\r\n    - `layer_normalization()`\r\n    - `layer_discretization()`\r\n\r\n  These join the previous set of text preprocessing functions, each of which have some minor changes:\r\n    - `layer_text_vectorization()` (changed arguments)\r\n    - `get_vocabulary()`\r\n    - `set_vocabulary()`\r\n    - `adapt()`\r\n\r\n- `adapt()` changes:\r\n  - Now accepts all *features preprocessing* layers, previously\r\n    only `layer_text_vectorization()` instances were valid.\r\n  - `reset_state` argument is removed. It only ever accepted the default value of `TRUE`.\r\n  - New arguments `batch_size` and `steps`.\r\n  - Now returns the adapted layer invisibly for composability with `%>%` (previously returned `NULL`)\r\n\r\n- `get_vocabulary()` gains a `include_special_tokens` argument.\r\n- `set_vocabulary()`:\r\n  - Now returns the adapted layer invisibly for composability with `%>%` (previously returned `NULL`)\r\n  - Signature simplified. Deprecated arguments (`df_data` `oov_df_value`) are now subsumed in `...`.\r\n\r\n- `layer_text_vectorization()`:\r\n  - valid values for argument `output_mode` change: `\"binary\"` is renamed to `\"multi_hot\"` and\r\n    `\"tf-idf\"` is renamed to `\"tf_idf\"` (backwards compatibility is preserved).\r\n  - Fixed an issue where valid values of `output_mode = \"int\"` would incorrectly\r\n    return a ragged tensor output shape.\r\n    \r\n\r\n- Existing layer instances gain the ability to be added to sequential models via a call. E.g.:\r\n  ```r\r\n  layer \u003C- layer_dense(units = 10)\r\n  model \u003C- keras_model_sequential(input_shape = c(1,2,3)) %>%\r\n    layer()\r\n  ```\r\n\r\n- Functions in the *merging layer* family gain the ability to return a layer instance if\r\n  the first argument `inputs` is missing. (affected: `layer_concatenate()`, `layer_add()`,\r\n  `layer_subtract()`, `layer_multiply()`, `layer_average()`, `layer_maximum()`,\r\n  `layer_minimum()` ,  `layer_dot()`)\r\n\r\n- `%py_class%` gains the ability to delay initializing the Python session until first use.\r\n  It is now safe to implement and export `%py_class%` objects in an R package.\r\n\r\n- Fixed an issue in `layer_input()` where passing a tensorflow `DType` objects to argument `dtype` would throw an error.\r\n\r\n- Fixed an issue in `compile()` where passing an R function via an in-line\r\n  call would result in an error from subsequent `fit()` calls.\r\n  (e.g., `compile(loss = function(y_true, y_pred) my_loss(y_true, y_pred))`\r\n  now succeeds)\r\n\r\n- `clone_model()` gains a `clone_function` argument that allows you to customize each layer as it is cloned.\r\n\r\n- Bumped minimum R version to 3.4. Expanded CI to test on all supported R version. Fixed regression that prevented package installation on R \u003C= 3.4\r\n","2021-09-30T19:20:31",{"id":233,"version":234,"summary_zh":235,"released_at":236},62529,"v2.6.0","Breaking changes (Tensorflow 2.6):\r\n- Note: The following breaking changes are specific to Tensorflow version 2.6.0.\r\n  However, the keras R package maintains compatibility with multiple versions of Tensorflow\u002FKeras.\r\n  You can upgrade the R package and still preserve the previous behavior by\r\n  installing a specific version of Tensorflow: `keras::install_keras(tensorflow=\"2.4.0\")`\r\n\r\n- `predict_proba()` and `predict_classes()` were removed.\r\n- `model_to_yaml()` and `model_from_yaml()` were removed.\r\n- default changed: `layer_text_vectorization(pad_to_max_tokens=FALSE)`\r\n- `set_vocabulary()` arguments `df_data` and `oov_df_value` are removed. They are replaced by the new argument `idf_weights`.\r\n\r\nNew Features:\r\n\r\n- Default Tensorflow\u002FKeras version is now 2.6\r\n\r\n- Introduced `%py_class%`, an R-language constructor for Python classes.\r\n\r\n- New vignettes:\r\n  - Subclassing Python classes: How to use `%py_class%`.\r\n  - Making new layers and models via subclassing.\r\n  - Customizing what happens in fit (example of how to define a model, like a GAN, with a custom train step).\r\n  - Writing your own callbacks.\r\n\r\n- The `keras` Python module is exported\r\n\r\n- Major changes to the underlying handling of custom R6 layer classes.\r\n  - A new `r_to_py()` method is provided for `R6ClassGenerator` objects.\r\n  - R6 custom layers can now inherit directly from Python layer classes\r\n    or other R6 custom layer classes.\r\n  - Custom R6 layers can now be instantiated directly after conversion of the class generator with `r_to_py()`, without going through `create_layer()`.\r\n  - `KerasLayer` is deprecated (new classes should inherit directly from `keras$layers$Layer`).\r\n  - `KerasWrapper` is deprecated (new classes should inherit directly from `keras$layers$Wrapper`).\r\n  - `create_wrapper()` is deprecated (no longer needed, use `create_layer()` directly).\r\n  - All layer class methods provided as R functions now have a `super` in scope that resolves to the Python super class object.\r\n  - Methods of `super` can be accessed in the 3 common ways:\r\n    - (Python 3 style): `super()$\"__init__\"()`\r\n    - (Python 2 style): `super(ClassName, self)$\"__init__\"()`\r\n    - (R6 style): `super$initialize()`\r\n  - User defined custom classes that inherit from a Python type are responsible for calling ```super()$`__init__`(...)``` if appropriate.\r\n  - Custom layers can now properly handle masks (#1225)\r\n    - `supports_masking = TRUE` attribute is now supported\r\n    - `compute_mask()` user defined method is now supported\r\n  - `call()` methods now support a `training` argument, as well as any additional arbitrary user-defined arguments\r\n\r\n- `Layer()` custom layer constructor is now lazy about initializing the Python session and safe to use on the top level of an R package (#1229).\r\n\r\n- New function `create_layer_wrapper()` that can create a composing R function wrapper around a custom layer class.\r\n\r\n- Refactored `install_keras()` (along with `tensorflow::install_tensorflow()`).\r\n  Installation should be more reliable for more users now.\r\n  If you encounter installation issues, please file an issue: https:\u002F\u002Fgithub.com\u002Frstudio\u002Fkeras\u002Fissues\u002Fnew\r\n  - Potentially breaking change: numeric versions supplied without a patchlevel now automatically pull the latest patch release.\r\n    (e.g. `install_keras(tensorflow=\"2.4\")` will install tensorflow version \"2.4.2\". Previously it would install \"2.4.0\")\r\n\r\n  - pandas is now a default extra packages installed by `install_keras()`\r\n  - pyyaml is no longer installed by `install_keras()` if TF >= 2.6.\r\n\r\n- Loss functions:\r\n  - All the loss functions gain the ability to return a callable\r\n    (a `keras$losses$Loss` instance) if `y_true` and `y_pred` arguments are missing.\r\n  - New builtin loss functions:\r\n\r\n      -  `loss_huber()`\r\n      -  `loss_kl_divergence()`\r\n\r\n- Metric functions:\r\n  - All the metric functions gain the ability to return a `keras$metrics$Metric` instance if called without `y_true` and `y_pred`\r\n  - Each metric function is now documented separately, with a common `?Metric` topic demonstrating example usage.\r\n  - New built-in metrics:\r\n\r\n      -  `metric_true_negatives()`\r\n      -  `metric_true_positives()`\r\n      -  `metric_false_negatives()`\r\n      -  `metric_false_positives()`\r\n      -  `metric_specificity_at_sensitivity()`\r\n      -  `metric_sensitivity_at_specificity()`\r\n      -  `metric_precision()`\r\n      -  `metric_precision_at_recall()`\r\n      -  `metric_sum()`\r\n      -  `metric_recall()`\r\n      -  `metric_recall_at_precision()`\r\n      -  `metric_root_mean_squared_error()`\r\n      -  `metric_sparse_categorical_accuracy()`\r\n      -  `metric_mean_tensor()`\r\n      -  `metric_mean_wrapper()`\r\n      -  `metric_mean_iou()`\r\n      -  `metric_mean_relative_error()`\r\n      -  `metric_logcosh_error()`\r\n      -  `metric_mean()`\r\n      -  `metric_cosine_similarity()`\r\n      -  `metric_categorical_hinge()`\r\n      -  `metric_accuracy()`\r\n      -  `metric_auc()`\r\n\r\n- `keras_model_sequential()` gains the abilit","2021-08-23T16:43:41",{"id":238,"version":239,"summary_zh":240,"released_at":241},62530,"v2.4.0","- Use compat module when using `set_session` and `get_session`. (#1046)\r\n- Allows passing other arguments to `keras_model` eg `name`. (#1045)\r\n- Fixed bug when serializing models with the plaidml backends.(#1084)\r\n- Install keras no longer tries to install scipy because it's already installed by tensorflow (#1081)\r\n- Fixed bug with `layer_text_vectorization` with TensorFlow >= 2.3 (#1131)\r\n- Handle renamed argument `text` to `input_text` in `text_one_hot` (#1133)\r\n- Added TensorFlow 2.3 to the CI (#1102)\r\n- Fix C stack error when using Image Data Generators and Time Series generators with TensorFlow \u003C= 2.0.1 (#1135)\r\n- Fixed warning raised in the initial epoch (@gsteinbu #1130)\r\n- Consistent result when using `text_hashing_trick` with missing values (@topepo #1048)\r\n- Added a custom error message for `k_logsumexp` as it was removed from Keras (#1137)\r\n- Fixed bug when printing models that are not built yet. (#1138)\r\n- Fix drop_duplicates DeprecationWarning with tf 2.3 (@gsteinbu #1139 #1141)\r\n- Fixed bug when plotting the model history if the model used an early stopping callback (#1140)\r\n- `install_keras` now installs a fixed version of h5py, because newer versions are backward incompatible. (#1142)\r\n- Simplify testing utilities by using a `helper-*` file. (#1173)\r\n- Deprecated `hdf5_matrix` if using TF >= 2.4 (#1175)\r\n- Fixed TensorFlow nightly installation on CI (#1176)\r\n- Support for TensorFlow v2.4: just small fixes for custom classes. (#1177)\r\n- Added `untar` argument to `get_file` as it seems to be slightly different from `extract` (#1179)\r\n- Warn when not using the tensorflow implementation of Keras (#1181)\r\n- Added `layer_layer_normalization` (#1183)\r\n- Added `layer_multihead_attention` (#1184)\r\n- Added `image_dataset_from_directory` (#1185)\r\n- Fixed bug when using a custom layer with a time distributed adverb. (#1188)\r\n- Added the `ragged` argument to `layer_input`. (#1193)\r\n- Fixed `*_generator` deadlocks with recent versions of TensorFlow (#1197)\r\n","2021-03-29T19:07:16"]