Skip to content
项目

yui0/catseye has 33 GitHub stars and 3 forks. Star changes are not measured yet. Last checked 2026-11-14 13:50 UTC. Last push 2026-11-13.

这些数字如何统计

可以做什么

  • Just include catseye.h and write your model in c. There is nothing to install.
  • Small dependency & simple implementation
  • OpenCL support (GPGPU)
  • OpenGL support (GPGPU)

实测星标增长

24小时
正在收集历史
7天
正在收集历史
15天
正在收集历史
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

关于

Neural network library written in C and Javascript

机器学习

README.md

原文

Cat's Eye

Neural network library and applications in C.

日本語

Location Contents
catseye.h Shared neural-network library
catseye_llm.h Shared GGUF/LLM inference runtime
transcript/ Speech transcription CLI, speech/ONNX headers, model tools, Colab notebooks, fixtures and tests
plamo/ PLaMo 3 Translate translation CLI (0.8B, Q4/Q8 quantization)
llm/ Original LLM examples and GPU implementation
example/, super_resolution/, word2vec/ Neural-network examples
tools/ General library tools

Run make help for project commands. make test runs the library tests (test/: finite-difference gradient check of every layer type, batch-norm / augmentation / safetensors / quantization / GEMM checks, small end-to-end training runs). Build transcription with make -C transcript and run it from that directory so its default models/ path resolves there. Use make legacy for the original root training examples.

Features

  • Lightweight and minimalistic:
    • Header only
    • Just include catseye.h and write your model in c. There is nothing to install.
    • Small dependency & simple implementation
  • Fast: [under construction]
    • OpenCL support (GPGPU)
    • OpenGL support (GPGPU)
    • SSE, AVX support (But gcc and clang support SIMD...)
    • OpenMP support
    • Support half precision floats (16bit)
  • Supported networks:
    • Activation functions
      • sigmoid
      • softmax
      • tanh, scaled tanh (1.7519 * tanh(2/3x))
      • ReLU, Leaky ReLU, ELU, RReLU
      • abs
      • identity
    • Loss functions
      • cross-entropy, mean-squared-error
    • Optimization algorithms
      • SGD (stochastic gradient descent) with/without L2 normalization
      • Momentum SGD
      • AdaGrad
      • RMSProp
      • Adam
    • Layer types
      • linear (mlp)
      • convolution
      • convolution 1d
      • deconvolution
      • Sub-Pixel Convolution (Pixel Shuffler)
      • max pooling
      • average pooling
      • global average pooling (GAP)
      • batch normalization (per-channel statistics over the batch; running mean/variance, gamma and beta are stored in the weights and used by CatsEye_forward() / CatsEye_predict())
      • concat
      • shortcut
  • Loader formats:

Learning rate and batch size

Every layer (dense, convolution, deconvolution, batch normalization) accumulates the mean gradient over the batch, and the bias is updated by the optimizer together with the weights. The learning rate eta therefore means the same thing in every layer. (Earlier versions averaged only in convolution layers; to keep an old setup, multiply eta of its dense/deconvolution layers by the batch size.)

Usage

Just include header files in your project.

for more information, see example/

$ dnf install ghostscript ocl-icd-devel
$ cd example
$ make
$ ./sin

Demo

Open In Colab

Question

  • Neural Network Always Produces Same/Similar Outputs for Any Input
    • Scale down the problem to manageable size.
    • Make sure you have enough hidden units.
    • Change the activation function and its parameters.
    • Change learning algorithm parameters.

Refrences