{"id":21098463,"url":"https://github.com/scarsty/cccc-lite","last_synced_at":"2025-10-12T22:29:52.599Z","repository":{"id":49047655,"uuid":"77283112","full_name":"scarsty/cccc-lite","owner":"scarsty","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-25T08:32:28.000Z","size":759,"stargazers_count":44,"open_issues_count":10,"forks_count":15,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-08T05:42:48.375Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scarsty.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-12-24T12:59:49.000Z","updated_at":"2025-03-06T13:34:00.000Z","dependencies_parsed_at":"2024-06-04T09:03:55.517Z","dependency_job_id":"e5cb2036-a8e3-4214-b5f5-9d0ea3a2d58d","html_url":"https://github.com/scarsty/cccc-lite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/scarsty/cccc-lite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scarsty%2Fcccc-lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scarsty%2Fcccc-lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scarsty%2Fcccc-lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scarsty%2Fcccc-lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scarsty","download_url":"https://codeload.github.com/scarsty/cccc-lite/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scarsty%2Fcccc-lite/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267693080,"owners_count":24129130,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T22:55:10.024Z","updated_at":"2025-10-12T22:29:47.549Z","avatar_url":"https://github.com/scarsty.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CCCC\n\u003cimg src='https://raw.githubusercontent.com/scarsty/neural-demo/master/logo.png'\u003e\n\ncccc为libwill的核心部分，负责神经网络的训练与推理。\n\n英文代号“will”意为“心愿”。\n\n## 简介\n\ncccc是同时支持第一代基于层和第二代基于操作的神经网络工具包，但是安装和使用远比同类工具简单。\n\ncccc正式支持Windows，且以Windows为主要开发平台。可以在不需要nccl的情况下进行并行。\n\ncccc的设计同时支持动态图和静态图。\n\ncccc同时支持N卡和A卡，无需为不同的显卡平台编译两个版本。甚至可以在同一电脑上安装两种显卡并行计算（并不是建议你这样做）。\n\ncccc的功能并不及其他的开源平台，其特色是简单的配置和单机下的速度，请酌情使用。\n\n## 编译说明\n\n### Windows下编译\n\n- 任何支持C++20以上的Visual Studio和可以相互配合的CUDA均可以使用，建议使用较新的版本。\n- 下载cuDNN的开发包，将h文件，lib文件和dll文件复制到cuda工具箱目录中的include，lib/x64和bin目录。或者复制到自己指定的某个目录也可以，但是可能需要自己设置环境变量。\n- 检查环境变量CUDA_PATH的值，通常应该是“C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\vxx.x”（后面的数字为版本号，有可能不同）。\n- 在cccc-cuda.vcproj文件中，有两处涉及cuda版本号，类似“CUDA xx.x.targets/props”，需按照自己的实际情况手动修改。\n- 需要安装线性代数库OpenBLAS（推荐使用vcpkg或者msys2），将其库文件置于链接器可以找到的位置。\n- 如需支持AMD的显卡，则应下载AMD的相关开发包并安装，同时检查gpu_lib.h中对应的宏。注意miopen仅有非官方编译的Windows版本，目前计算卷积的速度很慢。\n- 查看gpu_lib.h开头的ENABLE_CUDA和ENABLE_HIP的设置，修改此处或配置中的预处理部分打开或关闭对应的平台。\n- 一些dll文件默认情况并不在PATH环境变量中，应手动复制到work目录或者PATH环境变量中的目录，包括openblas.dll等。\n- 下载MNIST的文件解压后，放入work/mnist目录，文件名应为：t10k-images.idx3-ubyte，t10k-labels.idx1-ubyte，train-images.idx3-ubyte，train-labels.idx1-ubyte。某些解压软件可能解压后中间的.会变成-，请自行修改。\n- 编译Visual Studio工程，如只需要核心功能，请仅编译cccc-windows。执行以下命令测试效果，正常情况下准确率应在99%以上。\n  ```shell\n  cccc-windows -c mnist-lenet.ini\n  ```\n- 也可以使用FashionMNIST来测试，通过mnist_path选项可以设置不同的文件所在目录。通常测试集上准确率可以到91%左右。\n\n### Linux下编译\n\n#### x86_64\n- 请自行安装和配置CUDA，HIP（如需要）和OpenBLAS，尽量使用系统提供的包管理器自动安装的版本。随安装的版本不同，有可能需要修改cmake文件。\n- CUDA的默认安装文件夹应该是/usr/local/cuda，但是一些Linux发行版可能会安装至其他目录，这时需要修改CMakeLists.txt中的包含目录和链接目录。\n- 下载cuDNN，放到/usr/local/cuda，注意lib的目录有可能含有64。\n- 在neural目录下执行```cmake .```生成Makefile。\n- ```make```编译，可以加上-j加快速度。\n- 生成的可执行文件在bin文件夹。\n- 推荐自行建立一个专用于编译的目录，例如：\n```shell\nmkdir build\ncd build\ncmake ..\nmake\n```\n- 在work目录下有一个范例脚本，可以用来直接编译出所有的组件，建议参考。\n- 扩展需要单独编译。\n\n### mlcc\n\n本工程依赖作者编写的一个公共的功能库，请从\u003chttps://github.com/scarsty/mlcc\u003e获取最新版本，并将其置于与本目录（cccc-lite）同级的路径下。\n\n### logo\n\nlogo由Dr. Cheng ZD设计。\n\n旧版logo由Mr. Zou YB设计。\n\n### 关于lite版\n \nlite版只支持几个基本的激活函数和卷积、池化等基本连接。\n\n仅能使用一张显卡训练。\n\n不支持半精度。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscarsty%2Fcccc-lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscarsty%2Fcccc-lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscarsty%2Fcccc-lite/lists"}