[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-ivan-vasilev--neuralnetworks":3,"tool-ivan-vasilev--neuralnetworks":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",154349,2,"2026-04-13T23:32:16",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":75,"owner_location":76,"owner_email":77,"owner_twitter":75,"owner_website":75,"owner_url":78,"languages":79,"stars":84,"forks":85,"last_commit_at":86,"license":75,"difficulty_score":87,"env_os":88,"env_gpu":89,"env_ram":90,"env_deps":91,"category_tags":99,"github_topics":75,"view_count":32,"oss_zip_url":75,"oss_zip_packed_at":75,"status":17,"created_at":100,"updated_at":101,"faqs":102,"releases":133},7398,"ivan-vasilev\u002Fneuralnetworks","neuralnetworks","java deep learning algorithms and deep neural networks with gpu acceleration","neuralnetworks 是一款基于 Java 开发的深度学习框架，致力于在 JVM 生态中实现高效的深度神经网络训练。它主要解决了 Java 开发者在构建复杂 AI 模型时往往依赖外部语言绑定或缺乏原生 GPU 加速支持的痛点，让用户能够直接使用熟悉的 Java 语言进行高性能计算。\n\n该工具非常适合 Java 后端工程师、算法研究人员以及希望在企业级 Java 架构中集成深度学习能力的开发团队。其核心亮点在于通过 OpenCL 和 Aparapi 技术实现了原生的 GPU 加速，无需切换编程环境即可大幅提升训练速度。框架设计高度模块化，支持多层感知机、卷积神经网络（含多种池化策略）、受限玻尔兹曼机及自编码器等多种主流网络结构。同时，它内置了反向传播、对比散度等经典训练算法，并提供 Sigmoid、ReLU、Softmax 等丰富的激活函数，所有组件均兼容 GPU 执行。此外，项目还预置了 MNIST、CIFAR 等常用数据集的支持，并允许用户灵活扩展自定义数据源，是探索深度学习算法与落地应用的实用选择。","# Deep Neural Networks with GPU support\n\n**Update**\n_This is a newer version of the framework, that I developed while working at ExB Research. Currently, you can build the project, but some of the tests are not working. If you want to access the previous version it's available in the [old branch](https:\u002F\u002Fgithub.com\u002Fivan-vasilev\u002Fneuralnetworks\u002Ftree\u002Fold)._\n\nThis is a Java implementation of some of the algorithms for training deep neural networks. GPU support is provided via the OpenCL and Aparapi.\nThe architecture is designed with modularity, extensibility and pluggability in mind.\n\n#### Git structure\nI'm using the [git-flow](https:\u002F\u002Fgithub.com\u002Fnvie\u002Fgitflow) model. The most stable (but older) sources are available in the [_master_](https:\u002F\u002Fgithub.com\u002Fivan-vasilev\u002Fneuralnetworks\u002Ftree\u002Fmaster) branch, while the latest ones are in the [_develop_](https:\u002F\u002Fgithub.com\u002Fivan-vasilev\u002Fneuralnetworks\u002Ftree\u002Fdevelop) branch.\n\n**If you want to use the previous Java 7 compatible version you can check out [this](https:\u002F\u002Fgithub.com\u002Fivan-vasilev\u002Fneuralnetworks\u002Freleases\u002Ftag\u002Fv0.1.0-alpha) release.**\n\n## Neural network types\n* Multilayer perceptron\n* Convolutional networks with max pooling, average poolng and [stochastic pooling](http:\u002F\u002Ftechtalks.tv\u002Ftalks\u002Fstochastic-pooling-for-regularization-of-deep-convolutional-neural-networks\u002F58106\u002F).\n* Restricted Boltzmann Machine\n* Autoencoder\n* Deep belief network\n* Stacked autoencodeer\n\n## Training algorithms\n* Backpropagation - supports multilayer perceptrons, convolutional networks and [dropout](http:\u002F\u002Farxiv.org\u002Fpdf\u002F1207.0580.pdf).\n* Contrastive divergence and persistent contrastive divergence implemented using [these](http:\u002F\u002Fwww.iro.umontreal.ca\u002F~lisa\u002Fpublications2\u002Findex.php\u002Fpublications\u002Fshow\u002F239) and [these](http:\u002F\u002Fwww.cs.toronto.edu\u002F~hinton\u002Fabsps\u002FguideTR.pdf) guidelines.\n* Greedy layer-wise training for deep networks - works for stacked autoencoders and DBNs, but supports any kind of training.\n\nAll the algorithms support GPU execution. \n\nOut of the box supported datasets are [MNIST](http:\u002F\u002Fyann.lecun.com\u002Fexdb\u002Fmnist\u002F), [CIFAR-10\u002FCIFAR-100](http:\u002F\u002Fwww.cs.toronto.edu\u002F~kriz\u002Fcifar.html), [IRIS](http:\u002F\u002Farchive.ics.uci.edu\u002Fml\u002Fdatasets\u002FIris) and XOR, but you can easily implement your own.\n\nExperimental support of RGB image preprocessing operations - affine transformations, cropping, and color scaling (see Generaltest.java -> testImageInputProvider).\n\n## Activation functions\n* Sigmoid\n* Tanh\n* ReLU\n* LRN\n* Softplus\n* Softmax\n\nAll the functions support GPU execution. They can be applied to all types of networks and all training algorithms. You can also implement new activations.\n\n## How to build the library\n* **Java 8**.\n* To build the project you need [maven](http:\u002F\u002Fmaven.apache.org\u002F).\n* Depending on your environment you might need to download the relevant aparapi .dll or .so file (located in the root of each archive) from [here](https:\u002F\u002Fcode.google.com\u002Fp\u002Faparapi\u002Fdownloads\u002Flist) and add it's location to the system PATH variable. (This)[https:\u002F\u002Fcode.google.com\u002Fp\u002Faparapi\u002Fwiki\u002FDevelopersGuideLinux] is a guide on how to set up OpenCL in linux environment.\n\n## How to run the samples\nThe samples are organized as unit tests. If you want see examples on various popular datasets you can go to [nn-samples\u002Fsrc\u002Ftest\u002Fjava\u002Fcom\u002Fgithub\u002Fneuralnetworks\u002Fsamples\u002F](https:\u002F\u002Fgithub.com\u002Fivan-vasilev\u002Fneuralnetworks\u002Ftree\u002Fmaster\u002Fnn-samples\u002Fsrc\u002Ftest\u002Fjava\u002Fcom\u002Fgithub\u002Fneuralnetworks\u002Fsamples\u002Ftest).\n\n## Library structure\nThere are two projects:\n\n* nn-core - contains the full implementation.\n* nn-samples - contains implementations of popular datasets and \n* nn-performance - some performance metrics.\n* nn-userinterface - unfinished work on visual network representation.\n\nThe software design is tiered, each tier depending on the previous ones.\n\n### Network architecture\nThis is the first \"tier\". Each network is defined by a list of layers. Each layer has a set of connections that link it to the other layers of the network, making the network a directed acyclic graph. This structure can accommodate simple feedforwad nets, but also more complex architectures like http:\u002F\u002Fwww.cs.toronto.edu\u002F~hinton\u002Fabsps\u002Fimagenet.pdf. You can build your own specific network.\n\n### Data propagation\n\nThis tier is propagating data through the network. It takes advantage of it's graph structure. There are two main base components:\n\n* _LayerCalculator_ - propagates data through the graph. It receives target layer and input data clamped to a given layer (considered an input layer). It ensures that the data is propagated through the layers in the correct order and that all the connections in the graph are calculated. For example, during the feedforward phase of backpropagation the training data is clamped to the input layer and is propagated to the target layer (the output layer of the network). In the bp phase the output error derivative is clamped as \"input\" to the layer and the weights are updated using breadth-first graph traversal starting from the output layer. Essentially the role of the LayerCalculator is to provide the order, in which the network layers are calculated.\n* _ConnectionCalculator_ - base class for all neuron types (sigmoid, rectifiers, convolutional etc.). After the order of calculation of the layers is determined by the _LayerCalculator_, then the list of input connections for each layer is calculated by the _ConnectionCalculator_.\n\n#### GPU\nMost of the ConnectionCalculator implementations are optimized for GPU execution. There are two implementations - **Native OpenCL** and **Aparapi**. Aparapi imposes some important restrictions on the code that can be executed on the GPU. The most significant are:\n\n* only one-dimensional arrays (and variables) of primitive data types are allowed. It is not possible to use complex objects.\n* only member-methods of the Aparapi Kernel class itself are allowed to be called from the GPU executable code. \n\nTherefore before each GPU calculation all the data is converted to one-dim arrays and primitive type variables. Because of this all Aparapi neuron types are using either _AparapiWeightedSum_ (for fully connected layers and weighted sum input functions), _AparapiSubsampling2D_ (for subsampling layers) or _AparapiConv2D_ (for convolutional layers). \nMost of the data is represented as one-dimensional array by default (for example Matrix).\n\nThe native OpenCL implementation does not have these restrictions.\n\n### Training\nAll the trainers are using the _Trainer_ base class. They are optimized to run on the GPU, but you can plug-in other implementations and new training algorithms. The training procedure has training and testing phases. Each Trainer receives parameters (for example learning rate, momentum, etc) via _Properties_ (a _HashMap_). For the supported properties for each trainer please check the _TrainerFactory_ class.\n\n### Input data\nInput is provided to the neural network by the trainers via _TrainingInputProvider_ interface. Each _TrainingInputProvider_ provides training samples in the form of _TrainingInputData_ (default implementation is _TrainingInputDataImpl_). The input can be modified by a list of modifiers - for example _MeanInputFunction_ (for subtracting the mean value) and _ScalingInputFunction_ (scaling within a range). Currently _MnistInputProvider_ and _IrisInputProvider_ are implemented.\n\n#### Author\nIvan Vasilev (ivanvasilev [at] gmail (dot) com)\n\n#### License\n[MIT License](http:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n","# 带有GPU支持的深度神经网络\n\n**更新**\n_这是我在ExB Research工作期间开发的框架的新版本。目前，项目可以成功构建，但部分测试尚未通过。如果您想访问旧版本，可以在[旧分支](https:\u002F\u002Fgithub.com\u002Fivan-vasilev\u002Fneuralnetworks\u002Ftree\u002Fold)中找到。_\n\n这是一个用Java实现的深度神经网络训练算法集合。通过OpenCL和Aparapi提供了GPU支持。\n该架构的设计充分考虑了模块化、可扩展性和插拔性。\n\n#### Git结构\n我使用的是[git-flow](https:\u002F\u002Fgithub.com\u002Fnvie\u002Fgitflow)模型。最稳定（但较旧）的源代码位于[_master_](https:\u002F\u002Fgithub.com\u002Fivan-vasilev\u002Fneuralnetworks\u002Ftree\u002Fmaster)分支，而最新的代码则在[_develop_](https:\u002F\u002Fgithub.com\u002Fivan-vasilev\u002Fneuralnetworks\u002Ftree\u002Fdevelop)分支中。\n\n**如果您想使用之前的兼容Java 7的版本，可以查看[这个](https:\u002F\u002Fgithub.com\u002Fivan-vasilev\u002Fneuralnetworks\u002Freleases\u002Ftag\u002Fv0.1.0-alpha)发布版本。**\n\n## 神经网络类型\n* 多层感知器\n* 卷积神经网络，支持最大池化、平均池化以及[随机池化](http:\u002F\u002Ftechtalks.tv\u002Ftalks\u002Fstochastic-pooling-for-regularization-of-deep-convolutional-neural-networks\u002F58106\u002F)。\n* 受限玻尔兹曼机\n* 自编码器\n* 深度信念网络\n* 堆叠自编码器\n\n## 训练算法\n* 反向传播——支持多层感知器、卷积神经网络及[dropout](http:\u002F\u002Farxiv.org\u002Fpdf\u002F1207.0580.pdf)。\n* 使用[这些](http:\u002F\u002Fwww.iro.umontreal.ca\u002F~lisa\u002Fpublications2\u002Findex.php\u002Fpublications\u002Fshow\u002F239)和[这些](http:\u002F\u002Fwww.cs.toronto.edu\u002F~hinton\u002Fabsps\u002FguideTR.pdf)指南实现的对比散度与持久对比散度。\n* 针对深度网络的贪婪逐层训练——适用于堆叠自编码器和DBN，同时也支持任何类型的训练。\n\n所有算法均支持GPU执行。\n\n开箱即用的支持数据集包括[MNIST](http:\u002F\u002Fyann.lecun.com\u002Fexdb\u002Fmnist\u002F)、[CIFAR-10\u002FCIFAR-100](http:\u002F\u002Fwww.cs.toronto.edu\u002F~kriz\u002Fcifar.html)、[IRIS](http:\u002F\u002Farchive.ics.uci.edu\u002Fml\u002Fdatasets\u002FIris)和XOR，但您也可以轻松实现自己的数据集。\n\n实验性地支持RGB图像预处理操作——仿射变换、裁剪和颜色缩放（参见Generaltest.java -> testImageInputProvider）。\n\n## 激活函数\n* Sigmoid\n* Tanh\n* ReLU\n* LRN\n* Softplus\n* Softmax\n\n所有函数均支持GPU执行。它们可以应用于各类网络和所有训练算法。您也可以实现新的激活函数。\n\n## 如何构建库\n* **Java 8**。\n* 构建该项目需要[maven](http:\u002F\u002Fmaven.apache.org\u002F)。\n* 根据您的环境，可能需要从[这里](https:\u002F\u002Fcode.google.com\u002Fp\u002Faparapi\u002Fdownloads\u002Flist)下载相应的aparapi .dll或 .so文件（位于每个压缩包的根目录），并将其路径添加到系统PATH变量中。（这篇文档）[https:\u002F\u002Fcode.google.com\u002Fp\u002Faparapi\u002Fwiki\u002FDevelopersGuideLinux]介绍了如何在Linux环境下设置OpenCL。\n\n## 如何运行示例\n示例以单元测试的形式组织。如果您想查看各种流行数据集的示例，可以前往[nn-samples\u002Fsrc\u002Ftest\u002Fjava\u002Fcom\u002Fgithub\u002Fneuralnetworks\u002Fsamples\u002F](https:\u002F\u002Fgithub.com\u002Fivan-vasilev\u002Fneuralnetworks\u002Ftree\u002Fmaster\u002Fnn-samples\u002Fsrc\u002Ftest\u002Fjava\u002Fcom\u002Fgithub\u002Fneuralnetworks\u002Fsamples\u002Ftest)。\n\n## 库结构\n共有三个项目：\n\n* nn-core — 包含完整的实现。\n* nn-samples — 包含流行数据集的实现。\n* nn-performance — 一些性能指标。\n* nn-userinterface — 关于网络可视化表示的未完成工作。\n\n软件设计采用分层架构，每一层都依赖于前一层。\n\n### 网络架构\n这是第一层。“层”的列表定义了整个网络。每层包含一组连接，将它与其他层相连，从而形成一个有向无环图。这种结构既可以容纳简单的前馈网络，也能适应更复杂的架构，例如http:\u002F\u002Fwww.cs.toronto.edu\u002F~hinton\u002Fabsps\u002Fimagenet.pdf。您可以构建自己的特定网络。\n\n### 数据传播\n这一层负责在网络中传播数据，并充分利用其图结构。主要有两个基础组件：\n\n* _LayerCalculator_ — 在图中传播数据。它接收目标层和被钳制到某一层的输入数据（该层被视为输入层）。它确保数据按正确的顺序在各层之间传播，并且图中的所有连接都被正确计算。例如，在反向传播的前向传播阶段，训练数据被钳制到输入层，然后传播至目标层（即网络的输出层）。而在反向传播阶段，输出误差的导数被作为“输入”钳制到某一层，权重则从输出层开始，通过广度优先遍历图来更新。本质上，LayerCalculator的作用就是确定网络各层的计算顺序。\n* _ConnectionCalculator_ — 所有神经元类型（Sigmoid、ReLU、卷积等）的基类。当LayerCalculator确定了各层的计算顺序后，ConnectionCalculator会计算出每层的输入连接列表。\n\n#### GPU\n大多数ConnectionCalculator的实现都针对GPU执行进行了优化。有两种实现方式——**原生OpenCL**和**Aparapi**。Aparapi对可在GPU上执行的代码施加了一些重要限制，其中最主要的包括：\n\n* 只允许使用一维数组（以及变量）和基本数据类型。无法使用复杂对象。\n* 仅允许从GPU可执行代码中调用Aparapi Kernel类本身的成员方法。\n\n因此，在每次GPU计算之前，所有数据都会被转换为一维数组和基本数据类型的变量。正因如此，所有Aparapi神经元类型要么使用_AparapiWeightedSum_（用于全连接层和加权求和输入函数），要么使用_AparapiSubsampling2D_（用于下采样层），要么使用_AparapiConv2D_（用于卷积层）。默认情况下，大多数数据都以一维数组的形式表示（例如矩阵）。\n\n而原生OpenCL实现则没有这些限制。\n\n### 训练\n所有训练器都基于_Trainer_基类。它们已针对GPU运行进行了优化，但您也可以插入其他实现和新的训练算法。训练过程分为训练和测试两个阶段。每个Trainer通过_Properties_（一个HashMap）接收参数（例如学习率、动量等）。有关每个训练器支持的属性，请查阅_TrainerFactory_类。\n\n### 输入数据\n训练数据由训练器通过 _TrainingInputProvider_ 接口提供给神经网络。每个 _TrainingInputProvider_ 以 _TrainingInputData_ 的形式提供训练样本（默认实现为 _TrainingInputDataImpl_）。输入可以通过一系列修改器进行调整，例如 _MeanInputFunction_（用于减去均值）和 _ScalingInputFunction_（在一定范围内进行缩放）。目前实现了 _MnistInputProvider_ 和 _IrisInputProvider_。\n\n#### 作者\n伊万·瓦西列夫 (ivanvasilev [at] gmail (dot) com)\n\n#### 许可证\n[MIT 许可证](http:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)","# neuralnetworks 快速上手指南\n\n`neuralnetworks` 是一个基于 Java 的深度学习框架，支持多层感知机、卷积神经网络（CNN）、受限玻尔兹曼机等多种网络结构。其核心特性是原生支持 **GPU 加速**（通过 OpenCL 和 Aparapi），并采用模块化设计以便扩展。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**：Windows, Linux 或 macOS（需支持 OpenCL）。\n*   **JDK 版本**：必须安装 **Java 8**。\n    *   *注：如需兼容 Java 7，请使用 v0.1.0-alpha 版本。*\n*   **构建工具**：[Apache Maven](http:\u002F\u002Fmaven.apache.org\u002F)。\n*   **GPU 支持（可选但推荐）**：\n    *   显卡需支持 **OpenCL**。\n    *   **Aparapi 依赖**：若使用 Aparapi 后端进行 GPU 计算，需下载对应系统的 `.dll` (Windows) 或 `.so` (Linux) 文件，并将其路径添加到系统环境变量 `PATH` 中。\n        *   下载地址：[Aparapi Downloads](https:\u002F\u002Fcode.google.com\u002Fp\u002Faparapi\u002Fdownloads\u002Flist)\n        *   Linux 配置参考：[Aparapi Linux Guide](https:\u002F\u002Fcode.google.com\u002Fp\u002Faparapi\u002Fwiki\u002FDevelopersGuideLinux)\n\n## 安装步骤\n\n该项目使用 Maven 进行构建管理。\n\n1.  **克隆项目代码**\n    推荐使用稳定的 `master` 分支（包含较旧但稳定的代码），或使用 `develop` 分支获取最新功能（部分测试可能未通过）。\n\n    ```bash\n    git clone -b master https:\u002F\u002Fgithub.com\u002Fivan-vasilev\u002Fneuralnetworks.git\n    cd neuralnetworks\n    ```\n\n2.  **编译项目**\n    在项目根目录下执行以下命令进行构建：\n\n    ```bash\n    mvn clean install\n    ```\n\n    *注意：如果构建过程中出现与 Aparapi 相关的错误，请检查是否已正确配置 OpenCL 驱动及环境变量。*\n\n## 基本使用\n\n该库将示例代码组织为单元测试。最快速的上手方式是查看并运行现有的数据集示例（如 MNIST, IRIS, XOR 等）。\n\n### 1. 查看示例代码\n示例位于 `nn-samples` 模块中。您可以直接浏览源码了解如何构建网络和训练模型：\n\n*   **路径**：`nn-samples\u002Fsrc\u002Ftest\u002Fjava\u002Fcom\u002Fgithub\u002Fneuralnetworks\u002Fsamples\u002Ftest`\n*   **关键类**：查看 `Generaltest.java` 可了解图像预处理（仿射变换、裁剪等）及输入提供者的用法。\n\n### 2. 运行示例（以单元测试形式）\n您可以直接通过 Maven 运行特定的测试用例来观察网络训练过程。例如，运行包含 MNIST 数据集样本的测试：\n\n```bash\nmvn test -Dtest=com.github.neuralnetworks.samples.test.MnistTest\n```\n\n*(请将 `MnistTest` 替换为您想要运行的具体测试类名)*\n\n### 3. 核心代码逻辑简述\n若您要在自己的项目中集成，核心流程如下：\n\n1.  **定义网络架构**：通过层（Layers）和连接（Connections）构建有向无环图。\n2.  **准备数据**：实现 `TrainingInputProvider` 接口提供训练数据（支持内置的 MNIST, CIFAR, IRIS 等）。\n3.  **选择训练器**：使用 `Trainer` 基类（如反向传播 `Backpropagation`），并通过 `Properties` 设置学习率、动量等参数。\n4.  **执行训练**：调用训练器的 train 方法，框架会自动利用 GPU 加速计算（如果环境配置正确）。\n\n```java\n\u002F\u002F 伪代码示例：构建一个简单的训练流程\nProperties params = new Properties();\nparams.setProperty(\"learningRate\", \"0.01\");\n\nTrainer trainer = TrainerFactory.createTrainer(TrainerType.BACKPROPAGATION, params);\ntrainer.train(inputProvider, networkArchitecture);\n```\n\n> **提示**：所有算法（反向传播、对比散度等）和激活函数（Sigmoid, ReLU, Tanh 等）均默认支持 GPU 执行。如需自定义网络结构或激活函数，可利用其模块化架构进行扩展。","某金融科技公司后端团队需在纯 Java 环境中构建实时欺诈检测系统，以识别异常交易模式。\n\n### 没有 neuralnetworks 时\n- 团队被迫引入 Python 服务进行模型训练与推理，导致架构复杂化，需额外维护跨语言调用接口及数据序列化开销。\n- 缺乏原生的 GPU 加速支持，仅靠 CPU 处理多层感知机或卷积网络，导致海量交易数据的训练周期长达数天，无法满足实时性要求。\n- 难以灵活尝试不同的网络结构（如受限玻尔兹曼机或堆叠自编码器），自行实现底层反向传播算法耗时且易出错。\n- 现有 Java 机器学习库功能单一，不支持 Dropout 等关键正则化技术，模型在测试集上过拟合严重，泛化能力差。\n\n### 使用 neuralnetworks 后\n- 直接基于 Java 8 和 Maven 构建深度学习流程，无缝集成至现有微服务架构，消除了跨语言通信延迟与维护成本。\n- 利用 OpenCL 和 Aparapi 实现的 GPU 加速，将原本数天的训练时间缩短至数小时，显著提升了模型迭代效率。\n- 快速调用内置的多层感知机、卷积网络及深度信念网络模块，轻松实验不同拓扑结构，迅速找到最优欺诈识别模型。\n- 原生支持 Dropout、ReLU 及随机池化等先进算法，有效抑制过拟合，使模型在生产环境中的准确率大幅提升。\n\nneuralnetworks 让 Java 开发者无需切换技术栈，即可在本地享受企业级的 GPU 加速深度学习能力。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fivan-vasilev_neuralnetworks_31853afa.png","ivan-vasilev","Ivan Vasilev","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fivan-vasilev_92f1a796.png",null,"Sofia, Bulgaria","ivanvasilev@gmail.com","https:\u002F\u002Fgithub.com\u002Fivan-vasilev",[80],{"name":81,"color":82,"percentage":83},"Java","#b07219",100,1234,354,"2026-04-03T18:42:59",4,"Linux, Windows, macOS","非必需（支持 CPU），若启用 GPU 需支持 OpenCL 的显卡；未指定具体型号、显存大小或 CUDA 版本（因使用 OpenCL\u002FAparapi 而非 CUDA）","未说明",{"notes":92,"python":93,"dependencies":94},"这是一个基于 Java 的深度学习框架。若使用 Aparapi 进行 GPU 加速，需根据操作系统下载对应的 .dll (Windows) 或 .so (Linux) 文件并添加到系统 PATH 变量中；Linux 用户需单独配置 OpenCL 环境。项目采用 git-flow 分支模型，稳定版在 master 分支，最新版在 develop 分支。","不适用（该项目为 Java 实现）",[95,96,97,98],"Java 8","Maven","Aparapi","OpenCL",[14],"2026-03-27T02:49:30.150509","2026-04-14T15:31:24.185057",[103,108,113,118,123,128],{"id":104,"question_zh":105,"answer_zh":106,"source_url":107},33198,"为什么训练集上的误差高达 53%？如何降低误差？","高误差通常是因为输入数据未进行归一化处理。建议首先对输入数据进行归一化，确保数值在 0 到 1 的范围内。此外，可以尝试添加新的网络层，或者迁移到最新版本的源代码以使用改进的 ScalingInputFunction。有用户反馈，在进行数据归一化后，训练集误差从 53% 降到了 15%。","https:\u002F\u002Fgithub.com\u002Fivan-vasilev\u002Fneuralnetworks\u002Fissues\u002F27",{"id":109,"question_zh":110,"answer_zh":111,"source_url":112},33199,"运行测试时出现'Failed to load aparapi'或'Reverting to Java Thread Pool'警告怎么办？","这通常是因为系统无法找到 Aparapi 的原生库（如 aparapi_x86_64）或 OpenCL 库。解决方法是确保这些库文件位于系统的 PATH（Windows）或 LD_LIBRARY_PATH（Linux\u002FMac）环境变量中。如果在 Eclipse 中运行，需要在 Run Configuration 的 VM arguments 中设置 java.library.path，例如：-Djava.library.path=\u002Fpath\u002Fto\u002Fnative\u002Flibs。如果无法配置 GPU 环境，程序会自动回退到 Java 线程池（JTP）模式运行，虽然速度较慢但仍可工作。","https:\u002F\u002Fgithub.com\u002Fivan-vasilev\u002Fneuralnetworks\u002Fissues\u002F24",{"id":114,"question_zh":115,"answer_zh":116,"source_url":117},33200,"运行 MnistTest 时 RBM 测试误差为 100% 或极高是什么原因？","这通常是因为缺少 MNIST 数据集文件。请从 Yann LeCun 的网站（http:\u002F\u002Fyann.lecun.com\u002Fexdb\u002Fmnist\u002F）下载前四个链接对应的数据文件，并将它们解压到项目根目录下的 _nn-samples_ 文件夹中。确保文件路径正确后重新运行测试，误差应会显著降低。","https:\u002F\u002Fgithub.com\u002Fivan-vasilev\u002Fneuralnetworks\u002Fissues\u002F9",{"id":119,"question_zh":120,"answer_zh":121,"source_url":122},33201,"构建项目时遇到 FFNNTest.testParallelNetworks 测试失败（AssertionError: expected:\u003C1.32> but was:\u003C1.20...>）如何解决？","此错误通常是由于环境中缺少 libaparapi.so 原生库导致的。请检查是否已正确安装并配置了 Aparapi 库，确保 libaparapi.so 文件位于系统的 LD_LIBRARY_PATH 中。一旦库文件就位，浮点数计算的精度问题通常会消失，测试即可通过。","https:\u002F\u002Fgithub.com\u002Fivan-vasilev\u002Fneuralnetworks\u002Fissues\u002F6",{"id":124,"question_zh":125,"answer_zh":126,"source_url":127},33202,"这个库使用什么开源许可证？","该库使用的是 MIT 许可证。许可证文件可以在 develop 分支的 LICENSE.txt 中找到，同时也建议在 README.md 中查看相关说明。","https:\u002F\u002Fgithub.com\u002Fivan-vasilev\u002Fneuralnetworks\u002Fissues\u002F19",{"id":129,"question_zh":130,"answer_zh":131,"source_url":132},33203,"这个项目还在维护吗？","该项目目前已不再活跃维护。维护者已确认仓库处于废弃状态（\"Indeed it is\"），并建议用户知悉此情况。如有需求，建议寻找其他活跃的替代方案或自行 fork 项目进行开发。","https:\u002F\u002Fgithub.com\u002Fivan-vasilev\u002Fneuralnetworks\u002Fissues\u002F56",[134,139],{"id":135,"version":136,"summary_zh":137,"released_at":138},255371,"v0.2.0-alpha","本次发布使用了 Java 8 的新特性——Lambda 表达式和流，并将 Matrix 类替换为功能更强大的 Tensor 类。\n","2014-04-25T23:36:53",{"id":140,"version":141,"summary_zh":142,"released_at":143},255372,"v0.1.0-alpha","这是一个相对稳定的版本，使用 Java 7。未来的版本将使用 Java 8。\n","2014-04-16T09:25:31"]