Skip to content

Add dual activation - #357

Merged
kevlu8 merged 4 commits into
mainfrom
dual-act
Aug 9, 2026
Merged

Add dual activation#357
kevlu8 merged 4 commits into
mainfrom
dual-act

Conversation

@kevlu8

@kevlu8 kevlu8 commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Dual activation involves changing the L1->L2 activation from a single SCReLU to both CReLU and CSReLU. By combining two different activation functions, we are able to encode more information. Because we don't change the L1->L2 weights, the computational cost is minimal for a reasonable gain in evaluation accuracy.

The effective size of L2 therefore changes from 16 neurons to 32 neurons, where the first 16 are activated by CReLU and the latter 16 are activated by CSReLU. Thus, the L2->L3 transformation becomes a 32x32 matrix multiplication and the number of weights in that layer doubles.

@kevlu8
kevlu8 requested a review from wdotmathree August 9, 2026 02:16
Comment thread engine/nnue/network.cpp Outdated
kevlu8 added 2 commits August 8, 2026 23:07
Bench: 2312312
Bench: 2312312
@kevlu8
kevlu8 marked this pull request as ready for review August 9, 2026 15:25
@kevlu8
kevlu8 merged commit 9b58d1f into main Aug 9, 2026
9 of 16 checks passed
@kevlu8
kevlu8 deleted the dual-act branch August 9, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants